File tree Expand file tree Collapse file tree
main/kotlin/com/javiersc/kotlin/kopy/gradle/plugin
testIntegration/kotlin/com/javiersc/kotlin/kopy/gradle/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515### Updated
1616
17+ - ` com.javiersc.hubdle:hubdle-version-catalog -> 0.13.0 `
18+ - ` com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.18.1 `
1719- ` org.jetbrains.kotlin:kotlin-gradle-plugin -> 2.3.10 `
1820- ` gradle -> 9.3.1 `
1921
Original file line number Diff line number Diff line change 11[versions ]
2- hubdle = " 0.18.0 "
3- hubdleCatalog = " 0.12 .0"
2+ hubdle = " 0.18.1 "
3+ hubdleCatalog = " 0.13 .0"
44javiersc-kotlin-compiler-extensions = " 0.11.0+2.3.0"
55jetbrains-kotlin = " 2.3.10"
66
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ public class KopyGradlePlugin @Inject constructor(private val providers: Provide
3636 suppressKopyOptInt()
3737 reportKotlinVersion()
3838 }
39+ target.withAndroidApplication { dependencies { " api" (kopyRuntime) } }
40+ target.withAndroidLibrary { dependencies { " api" (kopyRuntime) } }
3941 target.withKotlinAndroid { dependencies { " api" (kopyRuntime) } }
4042 target.withKotlinJvm { dependencies { " api" (kopyRuntime) } }
4143 target.withKotlinMultiplatform {
@@ -105,6 +107,14 @@ public class KopyGradlePlugin @Inject constructor(private val providers: Provide
105107 }
106108 }
107109
110+ private fun Project.withAndroidApplication (action : Project .() -> Unit ) {
111+ pluginManager.withPlugin(" com.android.application" ) { action() }
112+ }
113+
114+ private fun Project.withAndroidLibrary (action : Project .() -> Unit ) {
115+ pluginManager.withPlugin(" com.android.library" ) { action() }
116+ }
117+
108118 private fun Project.withKotlinAndroid (action : Project .() -> Unit ) {
109119 pluginManager.withPlugin(" org.jetbrains.kotlin.android" ) { action() }
110120 }
@@ -118,6 +128,8 @@ public class KopyGradlePlugin @Inject constructor(private val providers: Provide
118128 }
119129
120130 private fun Project.withKotlin (action : Project .() -> Unit ) {
131+ withAndroidApplication(action)
132+ withAndroidLibrary(action)
121133 withKotlinAndroid(action)
122134 withKotlinJvm(action)
123135 withKotlinMultiplatform(action)
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ internal class KopyGradlePluginIntegrationTest : GradleProjectTest() {
2424 gradleProjectTest {
2525 pluginManager.apply (" com.javiersc.kotlin.kopy" )
2626 pluginManager.apply (" com.android.library" )
27- pluginManager.apply (" org.jetbrains.kotlin.android" )
2827 extensions.findByName(" kopy" ).shouldNotBeNull()
2928 extensions.findByType(KopyExtension ::class .java).shouldNotBeNull()
3029 val kopy: KopyGradlePlugin = plugins.getPlugin(KopyGradlePlugin ::class .java)
You can’t perform that action at this time.
0 commit comments