Test Gradle buildSrc with kotlin-gradle-plugin-api dependency
For ^KT-46517
This commit is contained in:
+11
@@ -743,6 +743,17 @@ class KotlinGradleIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testKotlinPluginDependenciesInBuildSrc() {
|
||||||
|
val project = transformProjectWithPluginsDsl("kotlinPluginDepsInBuildSrc")
|
||||||
|
project.setupWorkingDir()
|
||||||
|
project.build("build") {
|
||||||
|
assertSuccessful()
|
||||||
|
assertContains("Hi from BuildSrc")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testInternalTest() = with(
|
fun testInternalTest() = with(
|
||||||
Project("internalTest")
|
Project("internalTest")
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
import foo.bar.configureFromBuildSrc
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "<pluginMarkerVersion>"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
languageSettings {
|
||||||
|
configureFromBuildSrc()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
plugins {
|
||||||
|
kotlin("jvm") version "<pluginMarkerVersion>"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
dependencies {
|
||||||
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api:<pluginMarkerVersion>")
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package foo.bar
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder
|
||||||
|
|
||||||
|
fun LanguageSettingsBuilder.configureFromBuildSrc() {
|
||||||
|
println("Hi from BuildSrc: $this")
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user