Replace bunch copies for some of build.gradle.kts files with a DSL

This commit is contained in:
Yan Zhulanow
2018-09-25 20:20:27 +03:00
parent 81cfc3e39f
commit ba53ba37b0
31 changed files with 193 additions and 1034 deletions
+2
View File
@@ -263,6 +263,8 @@ fun Task.listConfigurationContents(configName: String) {
}
}
IdeVersionConfigurator.setCurrentIde(this)
val defaultJvmTarget = "1.8"
val defaultJavaHome = jdkPath(defaultJvmTarget)
val ignoreTestFailures by extra(project.findProperty("ignoreTestFailures")?.toString()?.toBoolean() ?: project.hasProperty("teamcity"))
@@ -0,0 +1,97 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
import org.gradle.api.Project
interface CompatibilityPredicate {
fun matches(ide: Ide): Boolean
operator fun invoke(block: () -> Unit): Any? {
if (matches(IdeVersionConfigurator.currentIde)) {
block()
return emptyList()
}
return null
}
}
val CompatibilityPredicate.not: CompatibilityPredicate get() = object : CompatibilityPredicate {
override fun matches(ide: Ide) = !this@not.matches(ide)
}
fun CompatibilityPredicate.or(other: CompatibilityPredicate): CompatibilityPredicate = object : CompatibilityPredicate {
override fun matches(ide: Ide) = this@or.matches(ide) || other.matches(ide)
}
enum class Platform : CompatibilityPredicate {
P173, P181, P182, P183;
val version: Int = name.drop(1).toInt()
override fun matches(ide: Ide) = ide.platform == this
companion object {
operator fun get(version: Int): Platform {
return Platform.values().firstOrNull { it.version == version }
?: error("Can't find platform $version")
}
}
}
enum class Ide(val platform: Platform) : CompatibilityPredicate {
IJ173(Platform.P173),
IJ181(Platform.P181),
IJ182(Platform.P182),
IJ183(Platform.P183),
AS31(Platform.P173),
AS32(Platform.P181),
AS33(Platform.P182);
val kind = Kind.values().first { it.shortName == name.take(2) }
val version = name.dropWhile { !it.isDigit() }.toInt()
override fun matches(ide: Ide) = ide == this
enum class Kind(val shortName: String) {
AndroidStudio("AS"), IntelliJ("IJ")
}
companion object {
val IJ: CompatibilityPredicate = IdeKindPredicate(Kind.IntelliJ)
val AS: CompatibilityPredicate = IdeKindPredicate(Kind.AndroidStudio)
}
}
val Platform.orHigher get() = object : CompatibilityPredicate {
override fun matches(ide: Ide) = ide.platform.version >= version
}
val Platform.orLower get() = object : CompatibilityPredicate {
override fun matches(ide: Ide) = ide.platform.version <= version
}
val Ide.orHigher get() = object : CompatibilityPredicate {
override fun matches(ide: Ide) = ide.kind == kind && ide.version >= version
}
val Ide.orLower get() = object : CompatibilityPredicate {
override fun matches(ide: Ide) = ide.kind == kind && ide.version <= version
}
object IdeVersionConfigurator {
lateinit var currentIde: Ide
fun setCurrentIde(project: Project) {
val platformVersion = project.rootProject.extensions.extraProperties["versions.platform"].toString()
val ideName = if (platformVersion.startsWith("AS")) platformVersion else "IJ$platformVersion"
currentIde = Ide.valueOf(ideName)
}
}
private class IdeKindPredicate(val kind: Ide.Kind) : CompatibilityPredicate {
override fun matches(ide: Ide) = ide.kind == kind
}
+17 -4
View File
@@ -54,7 +54,11 @@ dependencies {
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
(Platform[181].orHigher.or(Ide.AS31)) {
testRuntime(intellijPluginDep("smali"))
}
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("gradle"))
@@ -63,13 +67,22 @@ dependencies {
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("maven"))
Ide.IJ {
testRuntime(intellijPluginDep("maven"))
}
testRuntime(intellijPluginDep("testng"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
Ide.AS33.orHigher {
"main" { }
"test" { }
} ?: run {
"main" { projectDefault() }
"test" { projectDefault() }
}
}
projectTest {
-85
View File
@@ -1,85 +0,0 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-core"))
compile(project(":idea:ide-common"))
compile(project(":idea:idea-gradle"))
compile(androidDxJar())
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijDep())
compileOnly(intellijPluginDep("android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":idea:idea-jvm"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-gradle"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testCompile(intellijDep())
testCompile(intellijPluginDep("properties"))
testCompileOnly(intellijPluginDep("android"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":plugins:android-extensions-ide"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("testng"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
runtimeJar {
archiveName = "android-ide.jar"
}
ideaPlugin()
-86
View File
@@ -1,86 +0,0 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-core"))
compile(project(":idea:ide-common"))
compile(project(":idea:idea-gradle"))
compile(androidDxJar())
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijDep())
compileOnly(intellijPluginDep("android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":idea:idea-jvm"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-gradle"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testCompile(intellijDep())
testCompile(intellijPluginDep("properties"))
testCompileOnly(intellijPluginDep("android"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":plugins:android-extensions-ide"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("junit"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("testng"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
runtimeJar {
archiveName = "android-ide.jar"
}
ideaPlugin()
-86
View File
@@ -1,86 +0,0 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-core"))
compile(project(":idea:ide-common"))
compile(project(":idea:idea-gradle"))
compile(androidDxJar())
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijDep())
compileOnly(intellijPluginDep("android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":idea:idea-jvm"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-gradle"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testCompile(intellijDep())
testCompile(intellijPluginDep("properties"))
testCompileOnly(intellijPluginDep("android"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":plugins:android-extensions-ide"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("junit"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("testng"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
runtimeJar {
archiveName = "android-ide.jar"
}
ideaPlugin()
-86
View File
@@ -1,86 +0,0 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compileOnly(project(":kotlin-reflect-api"))
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-core"))
compile(project(":idea:ide-common"))
compile(project(":idea:idea-gradle"))
compile(androidDxJar())
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijDep())
compileOnly(intellijPluginDep("android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(project(":idea:idea-jvm"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-gradle"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testCompile(intellijDep())
testCompile(intellijPluginDep("properties"))
testCompileOnly(intellijPluginDep("android"))
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":plugins:android-extensions-ide"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
testRuntime(intellijPluginDep("copyright"))
testRuntime(intellijPluginDep("coverage"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("junit"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("testng"))
}
sourceSets {
"main" {}
"test" {}
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
runtimeJar {
archiveName = "android-ide.jar"
}
ideaPlugin()
@@ -56,14 +56,23 @@ dependencies {
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("maven"))
Ide.IJ {
testRuntime(intellijPluginDep("maven"))
}
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
(Platform[181].orHigher.or(Ide.AS31)) {
testRuntime(intellijPluginDep("smali"))
}
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
Ide.AS33.orHigher {
"main" { }
"test" { }
} ?: run {
"main" { projectDefault() }
"test" { projectDefault() }
}
}
testsJar {}
@@ -1,79 +0,0 @@
description = "Kotlin Android Extensions IDEA"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-gradle"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijPluginDep("android"))
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijDep())
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:kapt3-idea"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
testCompile(intellijPluginDep("android"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijDep())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":plugins:android-extensions-jps"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(project(":plugins:lint"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("properties"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("java-decompiler"))
testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("android"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
dependsOn(":kotlin-android-extensions-runtime:dist")
workingDir = rootDir
useAndroidSdk()
useAndroidJar()
}
runtimeJar()
ideaPlugin()
@@ -1,80 +0,0 @@
description = "Kotlin Android Extensions IDEA"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-gradle"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijPluginDep("android"))
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijDep())
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:kapt3-idea"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
testCompile(intellijPluginDep("android"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijDep())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":plugins:android-extensions-jps"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(project(":plugins:lint"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("properties"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("java-decompiler"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
dependsOn(":kotlin-android-extensions-runtime:dist")
workingDir = rootDir
useAndroidSdk()
useAndroidJar()
}
runtimeJar()
ideaPlugin()
@@ -1,80 +0,0 @@
description = "Kotlin Android Extensions IDEA"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-gradle"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijPluginDep("android"))
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijDep())
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:kapt3-idea"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
testCompile(intellijPluginDep("android"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijDep())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":plugins:android-extensions-jps"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(project(":plugins:lint"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("properties"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("java-decompiler"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
dependsOn(":kotlin-android-extensions-runtime:dist")
workingDir = rootDir
useAndroidSdk()
useAndroidJar()
}
runtimeJar()
ideaPlugin()
@@ -1,80 +0,0 @@
description = "Kotlin Android Extensions IDEA"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(project(":idea:idea-gradle"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(project(":kotlin-android-extensions-runtime"))
compileOnly(intellijPluginDep("android"))
compileOnly(intellijPluginDep("Groovy"))
compileOnly(intellijDep())
testCompile(project(":compiler:cli"))
testCompile(project(":compiler:frontend.java"))
testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:kapt3-idea"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(commonDep("junit:junit"))
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
testCompile(intellijPluginDep("android"))
testCompile(intellijPluginDep("Groovy"))
testCompile(intellijDep())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":plugins:android-extensions-jps"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(project(":plugins:lint"))
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("IntelliLang"))
testRuntime(intellijPluginDep("properties"))
testRuntime(intellijPluginDep("java-i18n"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("java-decompiler"))
//testRuntime(intellijPluginDep("maven"))
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
}
sourceSets {
"main" {}
"test" {}
}
testsJar {}
projectTest {
dependsOn(":kotlin-android-extensions-runtime:dist")
workingDir = rootDir
useAndroidSdk()
useAndroidJar()
}
runtimeJar()
ideaPlugin()
@@ -10,7 +10,10 @@ dependencies {
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(intellijDep()) { includeJars("openapi", "platform-api", "jps-builders", "jps-model", "jdom") }
compileOnly(intellijDep()) { includeJars("openapi", "jps-builders", "jps-model", "jdom") }
Platform[181].orHigher {
compileOnly(intellijDep()) { includeJars("platform-api") }
}
compileOnly(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
compile(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
@@ -23,14 +26,23 @@ dependencies {
testCompileOnly(intellijDep()) { includeJars("jps-model") }
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
(Platform[181].orHigher.or(Ide.AS31)) {
testRuntime(intellijPluginDep("smali"))
}
testRuntime(intellijDep("jps-build-test"))
testRuntime(intellijDep("jps-standalone"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
Ide.IJ {
"main" { projectDefault() }
"test" { projectDefault() }
}
Ide.AS {
"main" {}
"test" {}
}
}
projectTest {
@@ -1,40 +0,0 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(intellijDep()) { includeJars("openapi", "jps-builders", "jps-model", "jdom") }
compileOnly(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
compile(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
testCompile(projectTests(":jps-plugin"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":kotlin-build-common"))
testCompileOnly(intellijDep()) { includeJars("openapi", "jps-builders") }
testCompileOnly(intellijDep("jps-build-test")) { includeJars("jps-build-test") }
testCompileOnly(intellijDep()) { includeJars("jps-model") }
testRuntime(intellijPluginDep("android"))
testRuntime(intellijDep("jps-build-test"))
testRuntime(intellijDep("jps-standalone"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
@@ -1,41 +0,0 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(intellijDep()) { includeJars("openapi", "jps-builders", "jps-model", "jdom") }
compileOnly(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
compile(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
testCompile(projectTests(":jps-plugin"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":kotlin-build-common"))
testCompileOnly(intellijDep()) { includeJars("openapi", "jps-builders") }
testCompileOnly(intellijDep("jps-build-test")) { includeJars("jps-build-test") }
testCompileOnly(intellijDep()) { includeJars("jps-model") }
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
testRuntime(intellijDep("jps-build-test"))
testRuntime(intellijDep("jps-standalone"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
@@ -1,41 +0,0 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testRuntime(intellijDep())
compile(project(":compiler:util"))
compile(project(":jps-plugin"))
compile(project(":plugins:android-extensions-compiler"))
compileOnly(intellijDep()) { includeJars("openapi", "platform-api", "jps-builders", "jps-model", "jdom") }
compileOnly(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
compile(intellijPluginDep("android")) { includeJars("jps/android-jps-plugin") }
testCompile(projectTests(":jps-plugin"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":kotlin-build-common"))
testCompileOnly(intellijDep()) { includeJars("openapi", "jps-builders") }
testCompileOnly(intellijDep("jps-build-test")) { includeJars("jps-build-test") }
testCompileOnly(intellijDep()) { includeJars("jps-model") }
testRuntime(intellijPluginDep("android"))
testRuntime(intellijPluginDep("smali"))
testRuntime(intellijDep("jps-build-test"))
testRuntime(intellijDep("jps-standalone"))
}
sourceSets {
"main" {}
"test" {}
}
projectTest {
workingDir = rootDir
useAndroidSdk()
}
testsJar {}
@@ -9,7 +9,11 @@ plugins {
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi", "platform-api", "platform-impl") }
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi") }
Platform[181].orHigher {
testCompileOnly(intellijDep()) { includeJars("platform-api", "platform-impl") }
}
compile(project(":compiler:util"))
compile(project(":compiler:cli"))
@@ -1,56 +0,0 @@
description = "Annotation Processor for Kotlin"
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi") }
compile(project(":compiler:util"))
compile(project(":compiler:cli"))
compile(project(":compiler:backend"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
compileOnly(project(":kotlin-annotation-processing-base"))
compileOnly(project(":kotlin-annotation-processing-runtime"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-annotation-processing-base"))
testCompile(projectTests(":kotlin-annotation-processing-base"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-annotation-processing-runtime"))
embeddedComponents(project(":kotlin-annotation-processing-runtime")) { isTransitive = false }
embeddedComponents(project(":kotlin-annotation-processing-base")) { isTransitive = false }
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
workingDir = rootDir
dependsOn(":dist")
}
runtimeJar {
fromEmbeddedComponents()
}
sourcesJar()
javadocJar()
dist()
publish()
@@ -1,56 +0,0 @@
description = "Annotation Processor for Kotlin"
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "openapi") }
compile(project(":compiler:util"))
compile(project(":compiler:cli"))
compile(project(":compiler:backend"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
compileOnly(project(":kotlin-annotation-processing-base"))
compileOnly(project(":kotlin-annotation-processing-runtime"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
testCompile(projectTests(":compiler:tests-common"))
testCompile(project(":kotlin-annotation-processing-base"))
testCompile(projectTests(":kotlin-annotation-processing-base"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-annotation-processing-runtime"))
embeddedComponents(project(":kotlin-annotation-processing-runtime")) { isTransitive = false }
embeddedComponents(project(":kotlin-annotation-processing-base")) { isTransitive = false }
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
workingDir = rootDir
dependsOn(":dist")
}
runtimeJar {
fromEmbeddedComponents()
}
sourcesJar()
javadocJar()
dist()
publish()
@@ -15,10 +15,18 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea:idea-core"))
compile(project(":idea:idea-android"))
Ide.AS33.orHigher.not {
compile(project(":idea:idea-android"))
}
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(intellijDep()) { includeJars("openapi", "platform-api", "extensions", "util") }
compile(intellijDep()) { includeJars("openapi", "extensions", "util") }
Platform[181].orHigher {
compile(intellijDep()) { includeJars("platform-api") }
}
}
sourceSets {
@@ -1,32 +0,0 @@
description = "Kotlin SamWithReceiver IDEA Plugin"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
compile(project(":kotlin-sam-with-receiver-compiler-plugin"))
compile(project(":plugins:annotation-based-compiler-plugins-ide-support"))
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea:idea-core"))
compile(project(":idea:idea-android"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(intellijDep()) { includeJars("openapi", "extensions", "util") }
}
sourceSets {
"main" { projectDefault() }
"test" {}
}
runtimeJar()
ideaPlugin()
@@ -1,31 +0,0 @@
description = "Kotlin SamWithReceiver IDEA Plugin"
plugins {
kotlin("jvm")
id("jps-compatible")
}
jvmTarget = "1.6"
dependencies {
compile(project(":kotlin-sam-with-receiver-compiler-plugin"))
compile(project(":plugins:annotation-based-compiler-plugins-ide-support"))
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":idea:idea-core"))
compile(project(":idea"))
compile(project(":idea:idea-jvm"))
compile(intellijDep()) { includeJars("openapi", "platform-api", "extensions", "util") }
}
sourceSets {
"main" { projectDefault() }
"test" {}
}
runtimeJar()
ideaPlugin()
+19 -4
View File
@@ -12,9 +12,16 @@ dependencies {
compile(project(":compiler:frontend.java"))
compile(project(":compiler:light-classes"))
// BEWARE: Uast should not depend on IDEA.
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("java-api", "java-impl", "asm-all", rootProject = rootProject) }
Platform[181].orHigher {
// BEWARE: Uast should not depend on IDEA.
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeJars("java-api", "java-impl", "asm-all", rootProject = rootProject) }
}
Platform[173].orLower {
compile(project(":idea:idea-core"))
compileOnly(intellijDep()) { includeJars("openapi", "idea", "util", "extensions", "asm-all", rootProject = rootProject) }
}
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":compiler:tests-common"))
@@ -22,7 +29,15 @@ dependencies {
testCompile(project(":compiler:util"))
testCompile(project(":compiler:cli"))
testCompile(projectTests(":idea:idea-test-framework"))
testCompileOnly(intellijDep()) { includeJars("java-api", "java-impl") }
Platform[181].orHigher {
testCompileOnly(intellijDep()) { includeJars("java-api", "java-impl") }
}
Platform[173].orLower {
testCompileOnly(intellijDep()) { includeJars("idea_rt") }
}
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
-56
View File
@@ -1,56 +0,0 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
dependencies {
compile(project(":kotlin-stdlib"))
compile(project(":core:util.runtime"))
compile(project(":compiler:backend"))
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:light-classes"))
compile(project(":idea:idea-core"))
compileOnly(intellijDep()) { includeJars("openapi", "idea", "util", "extensions", "asm-all", rootProject = rootProject) }
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:cli"))
testCompile(projectTests(":idea:idea-test-framework"))
testCompileOnly(intellijDep()) { includeJars("idea_rt") }
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false }
testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":idea:idea-android"))
testRuntime(project(":idea:idea-gradle"))
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
testRuntime(project(":noarg-ide-plugin"))
testRuntime(project(":kotlin-scripting-idea"))
testRuntime(project(":plugins:android-extensions-ide"))
testRuntime(project(":plugins:kapt3-idea"))
testRuntime(project(":kotlinx-serialization-ide-plugin"))
testRuntime(intellijDep())
testRuntime(intellijPluginDep("junit"))
testRuntime(intellijPluginDep("gradle"))
testRuntime(intellijPluginDep("Groovy"))
testRuntime(intellijPluginDep("properties"))
}
sourceSets {
"main" { projectDefault() }
"test" { projectDefault() }
}
testsJar {}
projectTest {
workingDir = rootDir
}
+2
View File
@@ -27,6 +27,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -28,6 +28,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -28,6 +28,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -27,6 +27,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -28,6 +28,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -28,6 +28,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"
+2
View File
@@ -27,6 +27,8 @@ if (intellijVersionDelimiterIndex == -1) {
val platformBaseVersion = intellijVersion.substring(0, intellijVersionDelimiterIndex)
val platform = androidStudioVersion?.let { "AS$it" } ?: platformBaseVersion
rootProject.extra["versions.platform"] = platform
when (platform) {
"183" -> {
extra["versions.jar.guava"] = "25.1-jre"