Fix AllOpen plugin exposes common with Gradle runtime dependencies.
^KT-47354 Fixed
This commit is contained in:
@@ -1,40 +1,22 @@
|
|||||||
apply plugin: 'kotlin'
|
plugins {
|
||||||
apply plugin: 'jps-compatible'
|
id 'gradle-plugin-common-configuration'
|
||||||
|
id 'jps-compatible'
|
||||||
configureGradlePluginPublishing(project)
|
}
|
||||||
|
|
||||||
pill {
|
pill {
|
||||||
variant = 'FULL'
|
variant = 'FULL'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-gradle-plugin-api')
|
api project(':kotlin-gradle-plugin-api')
|
||||||
compile project(':kotlin-gradle-plugin-model')
|
api project(':kotlin-gradle-plugin-model')
|
||||||
|
|
||||||
compile kotlinStdlib()
|
|
||||||
compileOnly project(path: ':kotlin-compiler-embeddable', configuration: 'runtimeJar')
|
compileOnly project(path: ':kotlin-compiler-embeddable', configuration: 'runtimeJar')
|
||||||
compileOnly project(':kotlin-allopen-compiler-plugin')
|
compileOnly project(':kotlin-allopen-compiler-plugin')
|
||||||
|
|
||||||
compileOnly gradleApi()
|
|
||||||
|
|
||||||
testCompile gradleApi()
|
|
||||||
testCompile "junit:junit:4.12"
|
|
||||||
|
|
||||||
embedded(project(":kotlin-allopen-compiler-plugin")) { transitive = false }
|
embedded(project(":kotlin-allopen-compiler-plugin")) { transitive = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(project.compileKotlin.class) {
|
|
||||||
kotlinOptions.languageVersion = "1.3"
|
|
||||||
kotlinOptions.apiVersion = "1.3"
|
|
||||||
kotlinOptions.freeCompilerArgs += [
|
|
||||||
"-Xskip-prerelease-check", "-Xskip-runtime-version-check", "-Xsuppress-version-warnings"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
manifestAttributes(manifest, project)
|
|
||||||
}
|
|
||||||
|
|
||||||
ArtifactsKt.noDefaultJar(project)
|
ArtifactsKt.noDefaultJar(project)
|
||||||
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDefaultJarDepsToShadedCompiler(project, {}), {})
|
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDefaultJarDepsToShadedCompiler(project, {}), {})
|
||||||
configureSourcesJar()
|
configureSourcesJar()
|
||||||
|
|||||||
+5
-6
@@ -1,20 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.kotlin.allopen.gradle.model.builder
|
package org.jetbrains.kotlin.allopen.gradle.model.builder
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.model.AllOpen
|
import org.jetbrains.kotlin.gradle.model.AllOpen
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert
|
||||||
import org.junit.Assert.assertTrue
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
class AllOpenModelBuilderTest {
|
class AllOpenModelBuilderTest {
|
||||||
@Test
|
@Test
|
||||||
fun testCanBuild() {
|
fun testCanBuild() {
|
||||||
val modelBuilder = AllOpenModelBuilder()
|
val modelBuilder = AllOpenModelBuilder()
|
||||||
assertTrue(modelBuilder.canBuild(AllOpen::class.java.name))
|
Assert.assertTrue(modelBuilder.canBuild(AllOpen::class.java.name))
|
||||||
assertFalse(modelBuilder.canBuild("wrongModel"))
|
Assert.assertFalse(modelBuilder.canBuild("wrongModel"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user