File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
compiler-plugin/compiler-plugin-backend/src/main/kotlin/kotlinx/rpc/codegen/extension
gradle-conventions/src/main/kotlin/util/other Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ import org.jetbrains.kotlin.ir.util.dumpKotlinLike
7070import org.jetbrains.kotlin.ir.util.functions
7171import org.jetbrains.kotlin.ir.util.getPropertyGetter
7272import org.jetbrains.kotlin.ir.util.isObject
73+ import org.jetbrains.kotlin.ir.util.packageFqName
7374import org.jetbrains.kotlin.ir.util.primaryConstructor
7475import org.jetbrains.kotlin.name.Name
7576import org.jetbrains.kotlin.name.SpecialNames
Original file line number Diff line number Diff line change @@ -26,7 +26,12 @@ abstract class GenerateSourceTask @Inject constructor(
2626 @TaskAction
2727 fun generate () {
2828 val sourceFile = File (sourcesDir, " ${filename} .kt" )
29- sourceFile.writeText(text)
29+ sourceFile.writeText(" // THIS FILE IS AUTO-GENERATED, DO NOT EDIT!" )
30+ sourceFile.appendText(System .lineSeparator())
31+ sourceFile.appendText(" // Gradle task: $name " )
32+ sourceFile.appendText(System .lineSeparator())
33+ sourceFile.appendText(System .lineSeparator())
34+ sourceFile.appendText(text)
3035 }
3136}
3237
Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ generateSource(
116116 chooseSourceSet = { main }
117117)
118118
119+ val globalRootDir: String by extra
120+
119121generateSource(
120122 name = " TestVersions" ,
121123 text = """
@@ -125,7 +127,7 @@ generateSource(
125127
126128 const val BUILD_REPO: String = "${File (globalRootDir).resolve(" build/repo" ).absolutePath} "
127129
128- // can't use from generatePluginVersionsTask bacause Gradle messes up caches
130+ // can't use from Versions.kt bacause Gradle messes up caches
129131 const val TEST_PROTOBUF_VERSION: String = "${libs.versions.protobuf.asProvider().get()} "
130132 const val TEST_GRPC_VERSION: String = "${libs.versions.grpc.asProvider().get()} "
131133 const val TEST_GRPC_KOTLIN_VERSION: String = "${libs.versions.grpc.kotlin.get()} "
Original file line number Diff line number Diff line change @@ -20,9 +20,6 @@ org.gradle.configuration-cache=true
2020org.jetbrains.dokka.experimental.gradle.pluginMode =V2Enabled
2121org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn =true
2222
23- # https://youtrack.jetbrains.com/issue/KT-78504
24- kotlin.js.yarn =false
25-
2623# development mode for kotlinx.rpc gradle plugin. Uses local project paths to apply the compiler plugin
2724kotlinx.rpc.plugin.internalDevelopment =true
2825
You can’t perform that action at this time.
0 commit comments