Skip to content

Commit 58f9da3

Browse files
committed
Test Ksp plugin
1 parent 17ab460 commit 58f9da3

File tree

18 files changed

+256
-110
lines changed

18 files changed

+256
-110
lines changed

example/MultiplatformExample/iosApp/Pods/Local Podspecs/shared.podspec.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/MultiplatformExample/iosApp/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 89 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/MultiplatformExample/iosApp/Pods/Target Support Files/Pods-iosApp/Pods-iosApp.release.xcconfig

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/MultiplatformExample/iosApp/Pods/Target Support Files/shared/shared.debug.xcconfig

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/MultiplatformExample/iosApp/Pods/Target Support Files/shared/shared.release.xcconfig

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/MultiplatformExample/shared/shared.podspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
88
spec.summary = 'Some description for the Shared Module'
99
spec.vendored_frameworks = 'build/cocoapods/framework/shared.framework'
1010
spec.libraries = 'c++'
11-
spec.ios.deployment_target = '14.1'
11+
spec.ios.deployment_target = '14.1'
1212

1313

1414
if !Dir.exist?('build/cocoapods/framework/shared.framework') || Dir.empty?('build/cocoapods/framework/shared.framework')
@@ -22,6 +22,10 @@ Pod::Spec.new do |spec|
2222
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
2323
end
2424

25+
spec.xcconfig = {
26+
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
27+
}
28+
2529
spec.pod_target_xcconfig = {
2630
'KOTLIN_PROJECT_PATH' => ':shared',
2731
'PRODUCT_MODULE_NAME' => 'shared',

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ kctfork = "0.4.1"
99
kotlin = "2.0.0"
1010
kotlinPoet = "1.16.0"
1111
kspVersion = "2.0.0-1.0.21"
12-
ktorfit = "2.0.0"
13-
ktorfitKsp = "2.0.0"
14-
ktorfitCompiler = "2.0.0"
15-
ktorfitCallConverter = "2.0.0"
16-
ktorfitFlowConverter = "2.0.0"
17-
ktorfitResponseConverter = "2.0.0"
12+
ktorfit = "2.0.0-SNAPSHOT"
13+
ktorfitKsp = "2.0.0-SNAPSHOT"
14+
ktorfitCompiler = "2.0.0-SNAPSHOT"
15+
ktorfitCallConverter = "2.0.0-SNAPSHOT"
16+
ktorfitFlowConverter = "2.0.0-SNAPSHOT"
17+
ktorfitResponseConverter = "2.0.0-SNAPSHOT"
1818

1919
ktorfitGradlePlugin = "1.14.0"
2020
ktorVersion = "2.3.11"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

ktorfit-gradle-plugin/src/main/java/de/jensklingenberg/ktorfit/gradle/KtorfitCompilerSubPlugin.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package de.jensklingenberg.ktorfit.gradle
22

33
import org.gradle.api.Project
44
import org.gradle.api.provider.Provider
5+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
6+
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
57
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
68
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerPluginSupportPlugin
79
import org.jetbrains.kotlin.gradle.plugin.SubpluginArtifact
@@ -10,7 +12,7 @@ import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
1012
internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin {
1113

1214
companion object {
13-
const val SERIALIZATION_GROUP_NAME = "de.jensklingenberg.ktorfit"
15+
const val GROUP_NAME = "de.jensklingenberg.ktorfit"
1416
const val ARTIFACT_NAME = "compiler-plugin"
1517
const val COMPILER_PLUGIN_ID = "ktorfitPlugin"
1618
}
@@ -23,7 +25,7 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin {
2325

2426
return kotlinCompilation.target.project.provider {
2527
listOf(
26-
SubpluginOption("enabled", gradleExtension.enabled.toString()),
28+
SubpluginOption("enabled", "true"),
2729
SubpluginOption("logging", gradleExtension.logging.toString())
2830
)
2931
}
@@ -42,12 +44,14 @@ internal class KtorfitCompilerSubPlugin : KotlinCompilerPluginSupportPlugin {
4244
return true
4345
}
4446

47+
48+
49+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
4550
override fun getPluginArtifact(): SubpluginArtifact {
46-
myproject.getKtorfitConfig()
4751
return SubpluginArtifact(
48-
groupId = SERIALIZATION_GROUP_NAME,
52+
groupId = GROUP_NAME,
4953
artifactId = ARTIFACT_NAME,
50-
version = "2.0.0-2.0.0" // remember to bump this version before any release!
54+
version = "2.0.0-SNAPSHOT-"+ myproject.kotlinExtension.compilerVersion // remember to bump this version before any release!
5155
)
5256
}
5357
}

0 commit comments

Comments
 (0)