Build: upgrade gradle to 4.10
This commit is contained in:
+26
-23
@@ -383,14 +383,14 @@ val ideaPlugin by task<Task> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
"clean" {
|
create("clean") {
|
||||||
doLast {
|
doLast {
|
||||||
delete("$buildDir/repo")
|
delete("$buildDir/repo")
|
||||||
delete(distDir)
|
delete(distDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"cleanupArtifacts" {
|
create("cleanupArtifacts") {
|
||||||
doLast {
|
doLast {
|
||||||
delete(ideaPluginDir)
|
delete(ideaPluginDir)
|
||||||
delete(ideaUltimatePluginDir)
|
delete(ideaUltimatePluginDir)
|
||||||
@@ -398,7 +398,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"coreLibsTest" {
|
create("coreLibsTest") {
|
||||||
(coreLibProjects + listOf(
|
(coreLibProjects + listOf(
|
||||||
":kotlin-stdlib:samples",
|
":kotlin-stdlib:samples",
|
||||||
":kotlin-test:kotlin-test-js:kotlin-test-js-it",
|
":kotlin-test:kotlin-test-js:kotlin-test-js-it",
|
||||||
@@ -409,34 +409,34 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"gradlePluginTest" {
|
create("gradlePluginTest") {
|
||||||
gradlePluginProjects.forEach {
|
gradlePluginProjects.forEach {
|
||||||
dependsOn(it + ":check")
|
dependsOn(it + ":check")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"gradlePluginIntegrationTest" {
|
create("gradlePluginIntegrationTest") {
|
||||||
dependsOn(":kotlin-gradle-plugin-integration-tests:check")
|
dependsOn(":kotlin-gradle-plugin-integration-tests:check")
|
||||||
}
|
}
|
||||||
|
|
||||||
"jvmCompilerTest" {
|
create("jvmCompilerTest") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":compiler:test",
|
dependsOn(":compiler:test",
|
||||||
":compiler:container:test",
|
":compiler:container:test",
|
||||||
":compiler:tests-java8:test")
|
":compiler:tests-java8:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"jsCompilerTest" {
|
create("jsCompilerTest") {
|
||||||
dependsOn(":js:js.tests:test")
|
dependsOn(":js:js.tests:test")
|
||||||
dependsOn(":js:js.tests:runMocha")
|
dependsOn(":js:js.tests:runMocha")
|
||||||
}
|
}
|
||||||
|
|
||||||
"scriptingTest" {
|
create("scriptingTest") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":kotlin-script-util:test")
|
dependsOn(":kotlin-script-util:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"compilerTest" {
|
create("compilerTest") {
|
||||||
dependsOn("jvmCompilerTest")
|
dependsOn("jvmCompilerTest")
|
||||||
dependsOn("jsCompilerTest")
|
dependsOn("jsCompilerTest")
|
||||||
|
|
||||||
@@ -445,44 +445,44 @@ tasks {
|
|||||||
dependsOn(":compiler:incremental-compilation-impl:test")
|
dependsOn(":compiler:incremental-compilation-impl:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"toolsTest" {
|
create("toolsTest") {
|
||||||
dependsOn(":tools:kotlinp:test")
|
dependsOn(":tools:kotlinp:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"examplesTest" {
|
create("examplesTest") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
(project(":examples").subprojects + project(":kotlin-gradle-subplugin-example")).forEach { p ->
|
(project(":examples").subprojects + project(":kotlin-gradle-subplugin-example")).forEach { p ->
|
||||||
dependsOn("${p.path}:check")
|
dependsOn("${p.path}:check")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"distTest" {
|
create("distTest") {
|
||||||
dependsOn("compilerTest")
|
dependsOn("compilerTest")
|
||||||
dependsOn("toolsTest")
|
dependsOn("toolsTest")
|
||||||
dependsOn("gradlePluginTest")
|
dependsOn("gradlePluginTest")
|
||||||
dependsOn("examplesTest")
|
dependsOn("examplesTest")
|
||||||
}
|
}
|
||||||
|
|
||||||
"specTest" {
|
create("specTest") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":compiler:tests-spec:test")
|
dependsOn(":compiler:tests-spec:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"androidCodegenTest" {
|
create("androidCodegenTest") {
|
||||||
dependsOn(":compiler:android-tests:test")
|
dependsOn(":compiler:android-tests:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"jps-tests" {
|
create("jps-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":jps-plugin:test")
|
dependsOn(":jps-plugin:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"idea-plugin-main-tests" {
|
create("idea-plugin-main-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":idea:test")
|
dependsOn(":idea:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"idea-plugin-additional-tests" {
|
create("idea-plugin-additional-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":idea:idea-gradle:test",
|
dependsOn(":idea:idea-gradle:test",
|
||||||
":idea:idea-maven:test",
|
":idea:idea-maven:test",
|
||||||
@@ -490,20 +490,20 @@ tasks {
|
|||||||
":eval4j:test")
|
":eval4j:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"idea-plugin-tests" {
|
create("idea-plugin-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn("idea-plugin-main-tests",
|
dependsOn("idea-plugin-main-tests",
|
||||||
"idea-plugin-additional-tests")
|
"idea-plugin-additional-tests")
|
||||||
}
|
}
|
||||||
|
|
||||||
"android-ide-tests" {
|
create("android-ide-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":plugins:android-extensions-ide:test",
|
dependsOn(":plugins:android-extensions-ide:test",
|
||||||
":idea:idea-android:test",
|
":idea:idea-android:test",
|
||||||
":kotlin-annotation-processing:test")
|
":kotlin-annotation-processing:test")
|
||||||
}
|
}
|
||||||
|
|
||||||
"plugins-tests" {
|
create("plugins-tests") {
|
||||||
dependsOn("dist")
|
dependsOn("dist")
|
||||||
dependsOn(":kotlin-annotation-processing:test",
|
dependsOn(":kotlin-annotation-processing:test",
|
||||||
":kotlin-source-sections-compiler-plugin:test",
|
":kotlin-source-sections-compiler-plugin:test",
|
||||||
@@ -516,7 +516,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
"ideaPluginTest" {
|
create("ideaPluginTest") {
|
||||||
dependsOn(
|
dependsOn(
|
||||||
"idea-plugin-tests",
|
"idea-plugin-tests",
|
||||||
"jps-tests",
|
"jps-tests",
|
||||||
@@ -527,12 +527,15 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
"test" {
|
create("test") {
|
||||||
doLast {
|
doLast {
|
||||||
throw GradleException("Don't use directly, use aggregate tasks *-check instead")
|
throw GradleException("Don't use directly, use aggregate tasks *-check instead")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"check" { dependsOn("test") }
|
|
||||||
|
create("check") {
|
||||||
|
dependsOn("test")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun CopySpec.setExecutablePermissions() {
|
fun CopySpec.setExecutablePermissions() {
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
(plugins) {
|
plugins {
|
||||||
"pill-configurable" {
|
register("pill-configurable") {
|
||||||
id = "pill-configurable"
|
id = "pill-configurable"
|
||||||
implementationClass = "org.jetbrains.kotlin.pill.PillConfigurablePlugin"
|
implementationClass = "org.jetbrains.kotlin.pill.PillConfigurablePlugin"
|
||||||
}
|
}
|
||||||
"jps-compatible" {
|
register("jps-compatible") {
|
||||||
id = "jps-compatible"
|
id = "jps-compatible"
|
||||||
implementationClass = "org.jetbrains.kotlin.pill.JpsCompatiblePlugin"
|
implementationClass = "org.jetbrains.kotlin.pill.JpsCompatiblePlugin"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import org.gradle.api.file.DuplicatesStrategy
|
|||||||
import org.gradle.api.file.FileCollection
|
import org.gradle.api.file.FileCollection
|
||||||
import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact
|
import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact
|
||||||
import org.gradle.api.plugins.BasePluginConvention
|
import org.gradle.api.plugins.BasePluginConvention
|
||||||
import org.gradle.api.plugins.JavaPluginConvention
|
|
||||||
import org.gradle.api.tasks.javadoc.Javadoc
|
import org.gradle.api.tasks.javadoc.Javadoc
|
||||||
import org.gradle.jvm.tasks.Jar
|
import org.gradle.jvm.tasks.Jar
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -65,7 +64,7 @@ fun Project.noDefaultJar() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun<T> Project.runtimeJarArtifactBy(task: Task, artifactRef: T, body: ConfigurablePublishArtifact.() -> Unit = {}) {
|
fun Project.runtimeJarArtifactBy(task: Task, artifactRef: Any, body: ConfigurablePublishArtifact.() -> Unit = {}) {
|
||||||
addArtifact("archives", task, artifactRef, body)
|
addArtifact("archives", task, artifactRef, body)
|
||||||
addArtifact("runtimeJar", task, artifactRef, body)
|
addArtifact("runtimeJar", task, artifactRef, body)
|
||||||
configurations.findByName("runtime")?.let {
|
configurations.findByName("runtime")?.let {
|
||||||
@@ -80,17 +79,17 @@ fun<T: Jar> Project.runtimeJar(task: T, body: T.() -> Unit = {}): T {
|
|||||||
}
|
}
|
||||||
return task.apply {
|
return task.apply {
|
||||||
setupPublicJar(project.the<BasePluginConvention>().archivesBaseName)
|
setupPublicJar(project.the<BasePluginConvention>().archivesBaseName)
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
body()
|
body()
|
||||||
project.runtimeJarArtifactBy(this, this)
|
project.runtimeJarArtifactBy(this, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.runtimeJar(taskName: String = "jar", body: Jar.() -> Unit = {}): Jar = runtimeJar(getOrCreateTask(taskName, body))
|
fun Project.runtimeJar(body: Jar.() -> Unit = {}): Jar = runtimeJar(getOrCreateTask("jar", body), { })
|
||||||
|
|
||||||
fun Project.sourcesJar(sourceSet: String? = "main", body: Jar.() -> Unit = {}): Jar =
|
fun Project.sourcesJar(sourceSet: String? = "main", body: Jar.() -> Unit = {}): Jar =
|
||||||
getOrCreateTask("sourcesJar") {
|
getOrCreateTask("sourcesJar") {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
classifier = "sources"
|
classifier = "sources"
|
||||||
try {
|
try {
|
||||||
if (sourceSet != null) {
|
if (sourceSet != null) {
|
||||||
@@ -107,7 +106,7 @@ fun Project.sourcesJar(sourceSet: String? = "main", body: Jar.() -> Unit = {}):
|
|||||||
|
|
||||||
fun Project.javadocJar(body: Jar.() -> Unit = {}): Jar =
|
fun Project.javadocJar(body: Jar.() -> Unit = {}): Jar =
|
||||||
getOrCreateTask("javadocJar") {
|
getOrCreateTask("javadocJar") {
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
classifier = "javadoc"
|
classifier = "javadoc"
|
||||||
tasks.findByName("javadoc")?.let{ it as Javadoc }?.takeIf { it.enabled }?.let {
|
tasks.findByName("javadoc")?.let{ it as Javadoc }?.takeIf { it.enabled }?.let {
|
||||||
dependsOn(it)
|
dependsOn(it)
|
||||||
@@ -202,14 +201,14 @@ fun Jar.setupPublicJar(baseName: String, classifier: String = "") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun<T> Project.addArtifact(configuration: Configuration, task: Task, artifactRef: T, body: ConfigurablePublishArtifact.() -> Unit = {}) {
|
fun Project.addArtifact(configuration: Configuration, task: Task, artifactRef: Any, body: ConfigurablePublishArtifact.() -> Unit = {}) {
|
||||||
artifacts.add(configuration.name, artifactRef) {
|
artifacts.add(configuration.name, artifactRef) {
|
||||||
builtBy(task)
|
builtBy(task)
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun<T> Project.addArtifact(configurationName: String, task: Task, artifactRef: T, body: ConfigurablePublishArtifact.() -> Unit = {}) =
|
fun Project.addArtifact(configurationName: String, task: Task, artifactRef: Any, body: ConfigurablePublishArtifact.() -> Unit = {}) =
|
||||||
addArtifact(configurations.getOrCreate(configurationName), task, artifactRef, body)
|
addArtifact(configurations.getOrCreate(configurationName), task, artifactRef, body)
|
||||||
|
|
||||||
fun Project.cleanArtifacts() {
|
fun Project.cleanArtifacts() {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ private fun Project.compilerShadowJar(taskName: String, body: ShadowJar.() -> Un
|
|||||||
|
|
||||||
return task<ShadowJar>(taskName) {
|
return task<ShadowJar>(taskName) {
|
||||||
destinationDir = File(buildDir, "libs")
|
destinationDir = File(buildDir, "libs")
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
from(compilerJar)
|
from(compilerJar)
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ fun Project.embeddableCompilerDummyForDependenciesRewriting(taskName: String = "
|
|||||||
|
|
||||||
return task<ShadowJar>(taskName) {
|
return task<ShadowJar>(taskName) {
|
||||||
destinationDir = File(buildDir, "libs")
|
destinationDir = File(buildDir, "libs")
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
from(compilerDummyJar)
|
from(compilerDummyJar)
|
||||||
configureEmbeddableCompilerRelocation(withJavaxInject = false)
|
configureEmbeddableCompilerRelocation(withJavaxInject = false)
|
||||||
body()
|
body()
|
||||||
@@ -119,7 +119,7 @@ fun Project.rewriteDepsToShadedJar(originalJarTask: Jar, shadowJarTask: Jar, bod
|
|||||||
// which leads to the content of that JAR being excluded as well:
|
// which leads to the content of that JAR being excluded as well:
|
||||||
exclude { it.file == compilerDummyJarFile }
|
exclude { it.file == compilerDummyJarFile }
|
||||||
|
|
||||||
classifier = null
|
classifier = ""
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,12 +105,12 @@ open class IntelliJInstrumentCodeTask : ConventionTask() {
|
|||||||
get() = project.files(sourceSet!!.allSource.srcDirs.filter { !sourceSet!!.resources.contains(it) && it.exists() })
|
get() = project.files(sourceSet!!.allSource.srcDirs.filter { !sourceSet!!.resources.contains(it) && it.exists() })
|
||||||
|
|
||||||
@get:OutputDirectory
|
@get:OutputDirectory
|
||||||
var output: File? = null
|
lateinit var output: File
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun instrumentClasses() {
|
fun instrumentClasses() {
|
||||||
logger.info("input files are: ${originalClassesDirs?.joinToString("; ", transform = { "'${it.name}'${if (it.exists()) "" else " (does not exists)" }"})}")
|
logger.info("input files are: ${originalClassesDirs?.joinToString("; ", transform = { "'${it.name}'${if (it.exists()) "" else " (does not exists)" }"})}")
|
||||||
output?.deleteRecursively()
|
output.deleteRecursively()
|
||||||
copyOriginalClasses()
|
copyOriginalClasses()
|
||||||
|
|
||||||
val classpath = instrumentationClasspath!!
|
val classpath = instrumentationClasspath!!
|
||||||
|
|||||||
@@ -105,12 +105,12 @@ open class IntelliJInstrumentCodeTask : ConventionTask() {
|
|||||||
get() = project.files(sourceSet!!.allSource.srcDirs.filter { !sourceSet!!.resources.contains(it) && it.exists() })
|
get() = project.files(sourceSet!!.allSource.srcDirs.filter { !sourceSet!!.resources.contains(it) && it.exists() })
|
||||||
|
|
||||||
@get:OutputDirectory
|
@get:OutputDirectory
|
||||||
var output: File? = null
|
lateinit var output: File
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun instrumentClasses() {
|
fun instrumentClasses() {
|
||||||
logger.info("input files are: ${originalClassesDirs?.joinToString("; ", transform = { "'${it.name}'${if (it.exists()) "" else " (does not exists)" }"})}")
|
logger.info("input files are: ${originalClassesDirs?.joinToString("; ", transform = { "'${it.name}'${if (it.exists()) "" else " (does not exists)" }"})}")
|
||||||
output?.deleteRecursively()
|
output.deleteRecursively()
|
||||||
copyOriginalClasses()
|
copyOriginalClasses()
|
||||||
|
|
||||||
val classpath = instrumentationClasspath!!
|
val classpath = instrumentationClasspath!!
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ open class PublishedKotlinModule : Plugin<Project> {
|
|||||||
val password: String? by preparePublication.extra
|
val password: String? by preparePublication.extra
|
||||||
val repoUrl: String by preparePublication.extra
|
val repoUrl: String by preparePublication.extra
|
||||||
|
|
||||||
var repository: MavenRemoteRepository by Delegates.notNull()
|
var repository by Delegates.notNull<MavenRemoteRepository>()
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
withConvention(MavenRepositoryHandlerConvention::class) {
|
withConvention(MavenRepositoryHandlerConvention::class) {
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ fun unzipSdkTask(
|
|||||||
sdkName: String, sdkVer: String, destinationSubdir: String, coordinatesSuffix: String,
|
sdkName: String, sdkVer: String, destinationSubdir: String, coordinatesSuffix: String,
|
||||||
additionalConfig: Configuration? = null, dirLevelsToSkipOnUnzip: Int = 0, ext: String = "zip",
|
additionalConfig: Configuration? = null, dirLevelsToSkipOnUnzip: Int = 0, ext: String = "zip",
|
||||||
unzipFilter: CopySpec.() -> Unit = {}
|
unzipFilter: CopySpec.() -> Unit = {}
|
||||||
): DefaultTask {
|
): Task {
|
||||||
val id = "${sdkName}_$sdkVer"
|
val id = "${sdkName}_$sdkVer"
|
||||||
val cfg = configurations.create(id)
|
val cfg = configurations.create(id)
|
||||||
val dependency = "google:$sdkName:$sdkVer${coordinatesSuffix.takeIf{ it.isNotEmpty() }?.let { ":$it" } ?: ""}@$ext"
|
val dependency = "google:$sdkName:$sdkVer${coordinatesSuffix.takeIf { it.isNotEmpty() }?.let { ":$it" } ?: ""}@$ext"
|
||||||
dependencies.add(cfg.name, dependency)
|
dependencies.add(cfg.name, dependency)
|
||||||
|
|
||||||
val unzipTask = task("unzip_$id") {
|
val unzipTask = task("unzip_$id") {
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -63,13 +63,11 @@ projectTest {
|
|||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|
||||||
|
|
||||||
val testForWebDemo by task<Test> {
|
val testForWebDemo by task<Test> {
|
||||||
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
classpath = testSourceSet.runtimeClasspath
|
classpath = testSourceSet.runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
val cleanTestForWebDemo by tasks
|
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
@@ -77,7 +75,4 @@ test.apply {
|
|||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
|
||||||
val cleanTest by tasks
|
|
||||||
cleanTest.dependsOn(cleanTestForWebDemo)
|
|
||||||
|
|
||||||
ideaPlugin()
|
ideaPlugin()
|
||||||
|
|||||||
@@ -61,13 +61,11 @@ projectTest {
|
|||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|
||||||
|
|
||||||
val testForWebDemo by task<Test> {
|
val testForWebDemo by task<Test> {
|
||||||
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
classpath = testSourceSet.runtimeClasspath
|
classpath = testSourceSet.runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
val cleanTestForWebDemo by tasks
|
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
@@ -75,7 +73,4 @@ test.apply {
|
|||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
|
||||||
val cleanTest by tasks
|
|
||||||
cleanTest.dependsOn(cleanTestForWebDemo)
|
|
||||||
|
|
||||||
ideaPlugin()
|
ideaPlugin()
|
||||||
|
|||||||
@@ -62,13 +62,11 @@ projectTest {
|
|||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|
||||||
|
|
||||||
val testForWebDemo by task<Test> {
|
val testForWebDemo by task<Test> {
|
||||||
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
classpath = testSourceSet.runtimeClasspath
|
classpath = testSourceSet.runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
val cleanTestForWebDemo by tasks
|
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
@@ -76,7 +74,4 @@ test.apply {
|
|||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
|
||||||
val cleanTest by tasks
|
|
||||||
cleanTest.dependsOn(cleanTestForWebDemo)
|
|
||||||
|
|
||||||
ideaPlugin()
|
ideaPlugin()
|
||||||
|
|||||||
@@ -63,13 +63,11 @@ projectTest {
|
|||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|
||||||
|
|
||||||
val testForWebDemo by task<Test> {
|
val testForWebDemo by task<Test> {
|
||||||
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
classpath = testSourceSet.runtimeClasspath
|
classpath = testSourceSet.runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
val cleanTestForWebDemo by tasks
|
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
@@ -77,7 +75,4 @@ test.apply {
|
|||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
|
||||||
val cleanTest by tasks
|
|
||||||
cleanTest.dependsOn(cleanTestForWebDemo)
|
|
||||||
|
|
||||||
ideaPlugin()
|
ideaPlugin()
|
||||||
|
|||||||
@@ -63,13 +63,11 @@ projectTest {
|
|||||||
|
|
||||||
testsJar()
|
testsJar()
|
||||||
|
|
||||||
|
|
||||||
val testForWebDemo by task<Test> {
|
val testForWebDemo by task<Test> {
|
||||||
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
include("**/*JavaToKotlinConverterForWebDemoTestGenerated*")
|
||||||
classpath = testSourceSet.runtimeClasspath
|
classpath = testSourceSet.runtimeClasspath
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
val cleanTestForWebDemo by tasks
|
|
||||||
|
|
||||||
val test: Test by tasks
|
val test: Test by tasks
|
||||||
test.apply {
|
test.apply {
|
||||||
@@ -77,7 +75,4 @@ test.apply {
|
|||||||
dependsOn(testForWebDemo)
|
dependsOn(testForWebDemo)
|
||||||
}
|
}
|
||||||
|
|
||||||
val cleanTest by tasks
|
|
||||||
cleanTest.dependsOn(cleanTestForWebDemo)
|
|
||||||
|
|
||||||
ideaPlugin()
|
ideaPlugin()
|
||||||
|
|||||||
+1
-1
@@ -476,7 +476,7 @@ internal fun configureDefaultVersionsResolutionStrategy(project: Project, kotlin
|
|||||||
} else {
|
} else {
|
||||||
configuration.resolutionStrategy.eachDependency { details ->
|
configuration.resolutionStrategy.eachDependency { details ->
|
||||||
val requested = details.requested
|
val requested = details.requested
|
||||||
if (requested.group == "org.jetbrains.kotlin" && requested.version.isEmpty()) {
|
if (requested.group == "org.jetbrains.kotlin" && requested.version.isNullOrEmpty()) {
|
||||||
details.useVersion(kotlinPluginVersion)
|
details.useVersion(kotlinPluginVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-5
@@ -6,10 +6,7 @@
|
|||||||
package org.jetbrains.kotlin.gradle.plugin.mpp
|
package org.jetbrains.kotlin.gradle.plugin.mpp
|
||||||
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.artifacts.Configuration
|
import org.gradle.api.artifacts.*
|
||||||
import org.gradle.api.artifacts.DependencyConstraint
|
|
||||||
import org.gradle.api.artifacts.ModuleDependency
|
|
||||||
import org.gradle.api.artifacts.PublishArtifact
|
|
||||||
import org.gradle.api.attributes.AttributeContainer
|
import org.gradle.api.attributes.AttributeContainer
|
||||||
import org.gradle.api.attributes.Usage
|
import org.gradle.api.attributes.Usage
|
||||||
import org.gradle.api.capabilities.Capability
|
import org.gradle.api.capabilities.Capability
|
||||||
@@ -80,7 +77,7 @@ internal class KotlinPlatformUsageContext(
|
|||||||
override fun getCapabilities(): Set<Capability> = emptySet()
|
override fun getCapabilities(): Set<Capability> = emptySet()
|
||||||
|
|
||||||
// FIXME this is a stub for a function that is not present in the Gradle API that we compile against
|
// FIXME this is a stub for a function that is not present in the Gradle API that we compile against
|
||||||
fun getGlobalExcludes(): Set<Any> = emptySet()
|
override fun getGlobalExcludes(): Set<ExcludeRule> = emptySet()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun rewriteMppDependenciesToTargetModuleDependencies(
|
private fun rewriteMppDependenciesToTargetModuleDependencies(
|
||||||
|
|||||||
@@ -88,15 +88,25 @@ dependencies {
|
|||||||
|
|
||||||
val packCompiler by task<ShadowJar> {
|
val packCompiler by task<ShadowJar> {
|
||||||
configurations = listOf(fatJar)
|
configurations = listOf(fatJar)
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
destinationDir = File(buildDir, "libs")
|
destinationDir = File(buildDir, "libs")
|
||||||
|
|
||||||
setupPublicJar(compilerBaseName, "before-proguard")
|
setupPublicJar(compilerBaseName, "before-proguard")
|
||||||
|
|
||||||
from(fatJarContents)
|
from(fatJarContents)
|
||||||
afterEvaluate {
|
|
||||||
fatJarContentsStripServices.files.forEach { from(zipTree(it)) { exclude("META-INF/services/**") } }
|
dependsOn(fatJarContentsStripServices)
|
||||||
fatJarContentsStripMetadata.files.forEach { from(zipTree(it)) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
from {
|
||||||
|
fatJarContentsStripServices.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/services/**") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependsOn(fatJarContentsStripMetadata)
|
||||||
|
from {
|
||||||
|
fatJarContentsStripMetadata.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/jb/**", "META-INF/LICENSE") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
||||||
|
|||||||
@@ -88,15 +88,25 @@ dependencies {
|
|||||||
|
|
||||||
val packCompiler by task<ShadowJar> {
|
val packCompiler by task<ShadowJar> {
|
||||||
configurations = listOf(fatJar)
|
configurations = listOf(fatJar)
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
destinationDir = File(buildDir, "libs")
|
destinationDir = File(buildDir, "libs")
|
||||||
|
|
||||||
setupPublicJar(compilerBaseName, "before-proguard")
|
setupPublicJar(compilerBaseName, "before-proguard")
|
||||||
|
|
||||||
from(fatJarContents)
|
from(fatJarContents)
|
||||||
afterEvaluate {
|
|
||||||
fatJarContentsStripServices.files.forEach { from(zipTree(it)) { exclude("META-INF/services/**") } }
|
dependsOn(fatJarContentsStripServices)
|
||||||
fatJarContentsStripMetadata.files.forEach { from(zipTree(it)) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
from {
|
||||||
|
fatJarContentsStripServices.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/services/**") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependsOn(fatJarContentsStripMetadata)
|
||||||
|
from {
|
||||||
|
fatJarContentsStripMetadata.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/jb/**", "META-INF/LICENSE") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
||||||
|
|||||||
@@ -88,15 +88,25 @@ dependencies {
|
|||||||
|
|
||||||
val packCompiler by task<ShadowJar> {
|
val packCompiler by task<ShadowJar> {
|
||||||
configurations = listOf(fatJar)
|
configurations = listOf(fatJar)
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
|
||||||
destinationDir = File(buildDir, "libs")
|
destinationDir = File(buildDir, "libs")
|
||||||
|
|
||||||
setupPublicJar(compilerBaseName, "before-proguard")
|
setupPublicJar(compilerBaseName, "before-proguard")
|
||||||
|
|
||||||
from(fatJarContents)
|
from(fatJarContents)
|
||||||
afterEvaluate {
|
|
||||||
fatJarContentsStripServices.files.forEach { from(zipTree(it)) { exclude("META-INF/services/**") } }
|
dependsOn(fatJarContentsStripServices)
|
||||||
fatJarContentsStripMetadata.files.forEach { from(zipTree(it)) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
from {
|
||||||
|
fatJarContentsStripServices.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/services/**") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependsOn(fatJarContentsStripMetadata)
|
||||||
|
from {
|
||||||
|
fatJarContentsStripMetadata.files.map {
|
||||||
|
zipTree(it).matching { exclude("META-INF/jb/**", "META-INF/LICENSE") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
manifest.attributes["Class-Path"] = compilerManifestClassPath
|
||||||
|
|||||||
Reference in New Issue
Block a user