Skip to content

Commit c0faa9e

Browse files
authored
Merge pull request #4 from ExNDY/#3-android-application-extention-migration
#3 updated packagingOptions
2 parents 96ca299 + 6b1e172 commit c0faa9e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
mokoGradlePluginVersion = "0.4.2"
2+
mokoGradlePluginVersion = "0.4.3"
33

44
kotlinVersion = "1.9.25"
55
androidGradlePluginVerison = "8.3.2"

src/main/kotlin/dev/icerock/moko/gradle/AndroidAppPlugin.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
package dev.icerock.moko.gradle
66

7-
import com.android.build.gradle.AppExtension
7+
import com.android.build.api.dsl.ApplicationExtension
88
import org.gradle.api.Plugin
99
import org.gradle.api.Project
1010
import org.gradle.kotlin.dsl.configure
@@ -18,7 +18,7 @@ class AndroidAppPlugin : Plugin<Project> {
1818
apply(AndroidBasePlugin::class.java)
1919
}
2020

21-
target.configure<AppExtension> {
21+
target.configure<ApplicationExtension> {
2222
buildTypes {
2323
getByName("release") {
2424
isMinifyEnabled = true
@@ -33,12 +33,10 @@ class AndroidAppPlugin : Plugin<Project> {
3333
}
3434
}
3535

36-
packagingOptions {
37-
with(resources.excludes) {
38-
add("META-INF/*.kotlin_module")
39-
add("META-INF/AL2.0")
40-
add("META-INF/LGPL2.1")
41-
}
36+
packaging {
37+
resources.excludes.add("META-INF/*.kotlin_module")
38+
resources.excludes.add("META-INF/AL2.0")
39+
resources.excludes.add("META-INF/LGPL2.1")
4240
}
4341
}
4442
}

0 commit comments

Comments
 (0)