From b2b86fb6491f64a9da8a0203e796d96dd23e02f7 Mon Sep 17 00:00:00 2001 From: Jens Klingenberg Date: Sat, 25 May 2024 22:27:45 +0200 Subject: [PATCH] Test Ksp plugin --- .../AndroidOnlyExample/app/build.gradle.kts | 6 +++--- example/AndroidOnlyExample/build.gradle | 2 +- example/MultiplatformExample/build.gradle.kts | 4 ++-- .../MultiplatformExample/iosApp/Podfile.lock | 2 +- .../iosApp/Pods/Manifest.lock | 2 +- .../Pods-iosApp/Pods-iosApp.debug.xcconfig | 1 + .../shared/build.gradle.kts | 20 ------------------- .../gradle/KtorfitCompilerSubPlugin.kt | 3 +-- .../ktorfit/gradle/KtorfitGradlePlugin.kt | 7 +------ 9 files changed, 11 insertions(+), 36 deletions(-) diff --git a/example/AndroidOnlyExample/app/build.gradle.kts b/example/AndroidOnlyExample/app/build.gradle.kts index a33b87280..ab05f6f4d 100644 --- a/example/AndroidOnlyExample/app/build.gradle.kts +++ b/example/AndroidOnlyExample/app/build.gradle.kts @@ -1,9 +1,9 @@ plugins { id("com.android.application") id("org.jetbrains.kotlin.android") - id("com.google.devtools.ksp") version "1.9.23-1.0.20" - id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23" - id("de.jensklingenberg.ktorfit") version "2.0.0-2.0.0-SNAPSHOT" + id("com.google.devtools.ksp") version "2.0.0-RC3-1.0.20" + id("org.jetbrains.kotlin.plugin.serialization") version "2.0.0" + id("de.jensklingenberg.ktorfit") version "2.0.0-SNAPSHOT" } diff --git a/example/AndroidOnlyExample/build.gradle b/example/AndroidOnlyExample/build.gradle index e2e73a856..79d216f34 100644 --- a/example/AndroidOnlyExample/build.gradle +++ b/example/AndroidOnlyExample/build.gradle @@ -2,5 +2,5 @@ plugins { id 'com.android.application' version '8.0.2' apply false id 'com.android.library' version '8.0.2' apply false - id 'org.jetbrains.kotlin.android' version '1.9.23' apply false + id 'org.jetbrains.kotlin.android' version '2.0.0' apply false } \ No newline at end of file diff --git a/example/MultiplatformExample/build.gradle.kts b/example/MultiplatformExample/build.gradle.kts index 726d3515f..acdef8787 100644 --- a/example/MultiplatformExample/build.gradle.kts +++ b/example/MultiplatformExample/build.gradle.kts @@ -9,9 +9,9 @@ buildscript { } } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0-RC3") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") classpath("com.android.tools.build:gradle:7.3.1") - classpath("org.jetbrains.kotlin:kotlin-serialization:2.0.0-RC3") + classpath("org.jetbrains.kotlin:kotlin-serialization:2.0.0") } } diff --git a/example/MultiplatformExample/iosApp/Podfile.lock b/example/MultiplatformExample/iosApp/Podfile.lock index 11ec62e2d..919dca002 100644 --- a/example/MultiplatformExample/iosApp/Podfile.lock +++ b/example/MultiplatformExample/iosApp/Podfile.lock @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - shared: 2d3b24a8fe27b7d9e65b8d075a9672fbc6a1aa10 + shared: 90ed35de669e9fcb63a61e6b4bb0521eb732cc7a PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/example/MultiplatformExample/iosApp/Pods/Manifest.lock b/example/MultiplatformExample/iosApp/Pods/Manifest.lock index 11ec62e2d..919dca002 100644 --- a/example/MultiplatformExample/iosApp/Pods/Manifest.lock +++ b/example/MultiplatformExample/iosApp/Pods/Manifest.lock @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../shared" SPEC CHECKSUMS: - shared: 2d3b24a8fe27b7d9e65b8d075a9672fbc6a1aa10 + shared: 90ed35de669e9fcb63a61e6b4bb0521eb732cc7a PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756 diff --git a/example/MultiplatformExample/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig b/example/MultiplatformExample/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig index 3f303bf14..dbc2bf735 100644 --- a/example/MultiplatformExample/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig +++ b/example/MultiplatformExample/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.debug.xcconfig @@ -1,4 +1,5 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +ENABLE_USER_SCRIPT_SANDBOXING = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/../../shared/build/cocoapods/framework" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' diff --git a/example/MultiplatformExample/shared/build.gradle.kts b/example/MultiplatformExample/shared/build.gradle.kts index cdcd6c041..c7e29cd15 100644 --- a/example/MultiplatformExample/shared/build.gradle.kts +++ b/example/MultiplatformExample/shared/build.gradle.kts @@ -10,7 +10,6 @@ plugins { version = "1.0" val ktorVersion = "2.3.10" val ktorfitVersion = "2.0.0-SNAPSHOT" -val ktorfitKsp = "2.0.0-1.0.20-SNAPSHOT" kotlin { jvmToolchain(8) @@ -74,25 +73,6 @@ android { } } -dependencies { - with("de.jensklingenberg.ktorfit:ktorfit-ksp:$ktorfitKsp") { - add("kspCommonMainMetadata", this) - add("kspJvm", this) - add("kspJvmTest", this) - add("kspAndroid", this) - add("kspAndroidTest", this) - add("kspIosX64", this) - add("kspIosX64Test", this) - add("kspIosArm64", this) - add("kspIosArm64Test", this) - add("kspIosSimulatorArm64", this) - add("kspIosSimulatorArm64Test", this) - add("kspMacosX64", this) - add("kspMacosX64Test", this) - add("kspJs", this) - add("kspJsTest", this) - } -} tasks.withType { kotlinOptions { diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt index c09452825..f7caad574 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt @@ -46,12 +46,11 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin { - @OptIn(ExperimentalKotlinGradlePluginApi::class) override fun getPluginArtifact(): SubpluginArtifact { return SubpluginArtifact( groupId = GROUP_NAME, artifactId = ARTIFACT_NAME, - version = "2.0.0-SNAPSHOT-"+ myproject.kotlinExtension.compilerVersion // remember to bump this version before any release! + version = "2.0.0-SNAPSHOT-"+ "2.0.0" // remember to bump this version before any release! ) } } diff --git a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt index f2866255f..324b78555 100644 --- a/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt +++ b/ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitGradlePlugin.kt @@ -56,8 +56,7 @@ class KtorfitGradlePlugin : Plugin { } } - else -> { /* Do nothing */ - } + else -> Unit } } } @@ -92,7 +91,3 @@ class KtorfitGradlePlugin : Plugin { this.extensions.findByType(KtorfitGradleConfiguration::class.java) ?: KtorfitGradleConfiguration() } - -fun Project.config() { - -} \ No newline at end of file