Skip to content

Commit

Permalink
Test Ksp plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed May 25, 2024
1 parent 58f9da3 commit b2b86fb
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 36 deletions.
6 changes: 3 additions & 3 deletions example/AndroidOnlyExample/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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"
}


Expand Down
2 changes: 1 addition & 1 deletion example/AndroidOnlyExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions example/MultiplatformExample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")

}
}
Expand Down
2 changes: 1 addition & 1 deletion example/MultiplatformExample/iosApp/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../shared"

SPEC CHECKSUMS:
shared: 2d3b24a8fe27b7d9e65b8d075a9672fbc6a1aa10
shared: 90ed35de669e9fcb63a61e6b4bb0521eb732cc7a

PODFILE CHECKSUM: f282da88f39e69507b0a255187c8a6b644477756

Expand Down
2 changes: 1 addition & 1 deletion example/MultiplatformExample/iosApp/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions example/MultiplatformExample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class KtorfitGradlePlugin : Plugin<Project> {
}
}

else -> { /* Do nothing */
}
else -> Unit
}
}
}
Expand Down Expand Up @@ -92,7 +91,3 @@ class KtorfitGradlePlugin : Plugin<Project> {
this.extensions.findByType(KtorfitGradleConfiguration::class.java) ?: KtorfitGradleConfiguration()

}

fun Project.config() {

}

0 comments on commit b2b86fb

Please sign in to comment.