Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.build.config)
alias(libs.plugins.binary.compatibility.validator) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.binary.compatibility.validator) apply false
alias(libs.plugins.buildconfig) apply false
}

allprojects {
Expand Down
29 changes: 25 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
[versions]
# https://github.com/JetBrains/kotlin
kotlin = "2.2.20"
build-config = "5.6.5"
bcv = "0.16.3"

# https://github.com/Kotlin/binary-compatibility-validator
kotlin-binaryCompatibilityValidator = "0.16.3"

# https://github.com/junit-team/junit4
junit = "4.13.2"

# https://github.com/gmazzo/gradle-buildconfig-plugin
buildconfig = "5.6.5"


[libraries]
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
kotlin-test-junit5 = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit5", version.ref = "kotlin" }
kotlin-test-framework = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-internal-test-framework", version.ref = "kotlin" }
kotlin-annotations-jvm = { group = "org.jetbrains.kotlin", name = "kotlin-annotations-jvm", version.ref = "kotlin" }
kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler", version.ref = "kotlin" }
kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" }
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing space after kotlin-gradle-plugin-api. Consider removing the space for consistency with other library declarations.

Suggested change
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" }
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" }

Copilot uses AI. Check for mistakes.

junit = { module = "junit:junit", version.ref = "junit" }

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
build-config = { id = "com.github.gmazzo.buildconfig", version.ref = "build-config" }
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv" }
kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator"}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after closing brace. Should be kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator" }

Suggested change
kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator"}
kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator" }

Copilot uses AI. Check for mistakes.
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig"}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after closing brace. Should be buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }

Suggested change
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig"}
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }

Copilot uses AI. Check for mistakes.

gradle-java-test-fixtures = { id = "java-test-fixtures" }
gradle-idea = { id = "idea" }
gradle-plugin = { id = "java-gradle-plugin" }
6 changes: 3 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ dependencyResolutionManagement {

rootProject.name = "compiler-plugin-template"

include("compiler-plugin")
include("gradle-plugin")
include("plugin-annotations")
include("template-compiler-plugin")
include("template-gradle-plugin")
include("template-plugin-annotations")
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
kotlin("jvm")
`java-test-fixtures`
id("com.github.gmazzo.buildconfig")
idea
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.buildconfig)
alias(libs.plugins.gradle.java.test.fixtures)
alias(libs.plugins.gradle.idea)
}

sourceSets {
Expand All @@ -26,20 +26,20 @@ idea {
val annotationsRuntimeClasspath: Configuration by configurations.creating { isTransitive = false }

dependencies {
compileOnly(kotlin("compiler"))
compileOnly(libs.kotlin.compiler)

testFixturesApi(kotlin("test-junit5"))
testFixturesApi(kotlin("compiler-internal-test-framework"))
testFixturesApi(kotlin("compiler"))
testFixturesApi(libs.kotlin.test.junit5)
testFixturesApi(libs.kotlin.test.framework)
testFixturesApi(libs.kotlin.compiler)

annotationsRuntimeClasspath(project(":plugin-annotations"))
annotationsRuntimeClasspath(project(":template-plugin-annotations"))

// Dependencies required to run the internal test framework.
testRuntimeOnly(libs.junit)
testRuntimeOnly(kotlin("reflect"))
testRuntimeOnly(kotlin("test"))
testRuntimeOnly(kotlin("script-runtime"))
testRuntimeOnly(kotlin("annotations-jvm"))
testRuntimeOnly(libs.kotlin.reflect)
testRuntimeOnly(libs.kotlin.test)
testRuntimeOnly(libs.kotlin.script.runtime)
testRuntimeOnly(libs.kotlin.annotations.jvm)
}

buildConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5

fun main() {
generateTestGroupSuiteWithJUnit5 {
testGroup(testDataRoot = "compiler-plugin/testData", testsRoot = "compiler-plugin/test-gen") {
testGroup(testDataRoot = "template-compiler-plugin/testData", testsRoot = "template-compiler-plugin/test-gen") {
testClass<AbstractJvmDiagnosticTest> {
model("diagnostics")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@

/** This class is generated by {@link org.jetbrains.kotlin.compiler.plugin.template.GenerateTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler-plugin/testData/box")
@TestMetadata("template-compiler-plugin/testData/box")
@TestDataPath("$PROJECT_ROOT")
public class JvmBoxTestGenerated extends AbstractJvmBoxTest {
@Test
public void testAllFilesPresentInBox() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler-plugin/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("template-compiler-plugin/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}

@Test
@TestMetadata("anotherBoxTest.kt")
public void testAnotherBoxTest() {
runTest("compiler-plugin/testData/box/anotherBoxTest.kt");
runTest("template-compiler-plugin/testData/box/anotherBoxTest.kt");
}

@Test
@TestMetadata("simple.kt")
public void testSimple() {
runTest("compiler-plugin/testData/box/simple.kt");
runTest("template-compiler-plugin/testData/box/simple.kt");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@

/** This class is generated by {@link org.jetbrains.kotlin.compiler.plugin.template.GenerateTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler-plugin/testData/diagnostics")
@TestMetadata("template-compiler-plugin/testData/diagnostics")
@TestDataPath("$PROJECT_ROOT")
public class JvmDiagnosticTestGenerated extends AbstractJvmDiagnosticTest {
@Test
public void testAllFilesPresentInDiagnostics() {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler-plugin/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("template-compiler-plugin/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}

@Test
@TestMetadata("anotherDiagnosticTest.kt")
public void testAnotherDiagnosticTest() {
runTest("compiler-plugin/testData/diagnostics/anotherDiagnosticTest.kt");
runTest("template-compiler-plugin/testData/diagnostics/anotherDiagnosticTest.kt");
}

@Test
@TestMetadata("simple.kt")
public void testSimple() {
runTest("compiler-plugin/testData/diagnostics/simple.kt");
runTest("template-compiler-plugin/testData/diagnostics/simple.kt");
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
kotlin("jvm")
id("com.github.gmazzo.buildconfig")
id("java-gradle-plugin")
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.buildconfig)
alias(libs.plugins.gradle.plugin)
}

sourceSets {
Expand All @@ -16,22 +16,21 @@ sourceSets {
}

dependencies {
implementation(kotlin("gradle-plugin-api"))

testImplementation(kotlin("test-junit5"))
implementation(libs.kotlin.gradle.plugin.api)
testImplementation(libs.kotlin.test.junit5)
}

buildConfig {
packageName(project.group.toString())

buildConfigField("String", "KOTLIN_PLUGIN_ID", "\"${rootProject.group}\"")

val pluginProject = project(":compiler-plugin")
val pluginProject = project(":template-compiler-plugin")
buildConfigField("String", "KOTLIN_PLUGIN_GROUP", "\"${pluginProject.group}\"")
buildConfigField("String", "KOTLIN_PLUGIN_NAME", "\"${pluginProject.name}\"")
buildConfigField("String", "KOTLIN_PLUGIN_VERSION", "\"${pluginProject.version}\"")

val annotationsProject = project(":plugin-annotations")
val annotationsProject = project(":template-plugin-annotations")
buildConfigField(
type = "String",
name = "ANNOTATIONS_LIBRARY_COORDINATES",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
id("org.jetbrains.kotlinx.binary-compatibility-validator")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.binary.compatibility.validator)
}

kotlin {
Expand Down