Skip to content

Commit

Permalink
Merge pull request #62 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.14.3
  • Loading branch information
Alex009 authored Sep 29, 2024
2 parents dd9b8a2 + 4932fb1 commit ef1d159
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 44 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ repositories {
}

dependencies {
implementation("dev.icerock:mobile-multiplatform:0.14.2")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
implementation("com.android.tools.build:gradle:7.0.4")
implementation("dev.icerock:mobile-multiplatform:0.14.3")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
implementation("com.android.tools.build:gradle:8.3.2")
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kotlinVersion = "1.6.10"
androidGradlePluginVerison = "7.0.4"
publishPluginVersion = "0.15.0"
mobileMultiplatformGradlePluginVersion = "0.14.2"
mobileMultiplatformGradlePluginVersion = "0.14.3"

[libraries]
androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePluginVerison" }
Expand Down
24 changes: 19 additions & 5 deletions src/main/kotlin/dev/icerock/gradle/AppleFrameworkPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

package dev.icerock.gradle

import dev.icerock.gradle.tasks.SyncCocoaPodFrameworkTask
import com.android.build.gradle.internal.tasks.factory.dependsOn
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.TaskProvider
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.mpp.Framework
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink
import java.io.File

open class AppleFrameworkPlugin : Plugin<Project> {
override fun apply(target: Project) {
Expand Down Expand Up @@ -46,13 +49,24 @@ open class AppleFrameworkPlugin : Plugin<Project> {
private fun configureSyncFrameworkTasks(
framework: Framework
) {
val linkTask: KotlinNativeLink = framework.linkTask
val linkTask: TaskProvider<out KotlinNativeLink> = framework.linkTaskProvider
val syncTaskName: String = linkTask.name.replaceFirst("link", "sync")
val project: Project = framework.project

framework.project.tasks.create(syncTaskName, SyncCocoaPodFrameworkTask::class.java) {
inputDir = framework.outputDirectory
val outputDir = File(project.buildDir, "cocoapods/framework")
val inputDir: File = framework.outputDirectory

dependsOn(linkTask)
val syncTask: TaskProvider<Exec> = project.tasks.register(syncTaskName, Exec::class.java) {
group = "cocoapods"

commandLine("cp", "-R", inputDir.absolutePath, outputDir.absolutePath)

doFirst {
if (outputDir.exists()) {
outputDir.deleteRecursively()
}
}
}
syncTask.dependsOn(linkTask)
}
}

This file was deleted.

0 comments on commit ef1d159

Please sign in to comment.