Build: Drop ultimate, cidr and kmm from the build (KTI-563)
This commit is contained in:
committed by
teamcityserver
parent
9a4ff6e201
commit
a4005cef19
@@ -58,7 +58,6 @@ build/
|
|||||||
.idea/artifacts/kotlin_stdlib_wasm_*
|
.idea/artifacts/kotlin_stdlib_wasm_*
|
||||||
.idea/jarRepositories.xml
|
.idea/jarRepositories.xml
|
||||||
.idea/csv-plugin.xml
|
.idea/csv-plugin.xml
|
||||||
kotlin-ultimate/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
.rpt2_cache/
|
.rpt2_cache/
|
||||||
libraries/tools/kotlin-test-js-runner/lib/
|
libraries/tools/kotlin-test-js-runner/lib/
|
||||||
|
|||||||
+1
-23
@@ -89,10 +89,8 @@ val distKotlinHomeDir by extra("$distDir/kotlinc")
|
|||||||
val distLibDir = "$distKotlinHomeDir/lib"
|
val distLibDir = "$distKotlinHomeDir/lib"
|
||||||
val commonLocalDataDir = "$rootDir/local"
|
val commonLocalDataDir = "$rootDir/local"
|
||||||
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
||||||
val ideaUltimateSandboxDir = "$commonLocalDataDir/ideaUltimateSandbox"
|
|
||||||
val artifactsDir = "$distDir/artifacts"
|
val artifactsDir = "$distDir/artifacts"
|
||||||
val ideaPluginDir = "$artifactsDir/ideaPlugin/Kotlin"
|
val ideaPluginDir = "$artifactsDir/ideaPlugin/Kotlin"
|
||||||
val ideaUltimatePluginDir = "$artifactsDir/ideaUltimatePlugin/Kotlin"
|
|
||||||
|
|
||||||
extra["ktorExcludesForDaemon"] = listOf(
|
extra["ktorExcludesForDaemon"] = listOf(
|
||||||
"org.jetbrains.kotlin" to "kotlin-reflect",
|
"org.jetbrains.kotlin" to "kotlin-reflect",
|
||||||
@@ -110,9 +108,7 @@ extra["distLibDir"] = project.file(distLibDir)
|
|||||||
extra["libsDir"] = project.file(distLibDir)
|
extra["libsDir"] = project.file(distLibDir)
|
||||||
extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
||||||
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
||||||
extra["ideaUltimateSandboxDir"] = project.file(ideaUltimateSandboxDir)
|
|
||||||
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
||||||
extra["ideaUltimatePluginDir"] = project.file(ideaUltimatePluginDir)
|
|
||||||
extra["isSonatypeRelease"] = false
|
extra["isSonatypeRelease"] = false
|
||||||
val kotlinNativeVersionObject = project.kotlinNativeVersionValue()
|
val kotlinNativeVersionObject = project.kotlinNativeVersionValue()
|
||||||
subprojects {
|
subprojects {
|
||||||
@@ -194,7 +190,6 @@ if (!project.hasProperty("versions.kotlin-native")) {
|
|||||||
extra["versions.kotlin-native"] = "1.5.20-dev-5613"
|
extra["versions.kotlin-native"] = "1.5.20-dev-5613"
|
||||||
}
|
}
|
||||||
|
|
||||||
val intellijUltimateEnabled by extra(project.kotlinBuildProperties.intellijUltimateEnabled)
|
|
||||||
val effectSystemEnabled by extra(project.getBooleanProperty("kotlin.compiler.effectSystemEnabled") ?: false)
|
val effectSystemEnabled by extra(project.getBooleanProperty("kotlin.compiler.effectSystemEnabled") ?: false)
|
||||||
val newInferenceEnabled by extra(project.getBooleanProperty("kotlin.compiler.newInferenceEnabled") ?: false)
|
val newInferenceEnabled by extra(project.getBooleanProperty("kotlin.compiler.newInferenceEnabled") ?: false)
|
||||||
val useJvmIrBackend by extra(project.kotlinBuildProperties.useIR)
|
val useJvmIrBackend by extra(project.kotlinBuildProperties.useIR)
|
||||||
@@ -951,22 +946,6 @@ tasks {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
register("kmmTest", AggregateTest::class) {
|
|
||||||
dependsOn(
|
|
||||||
":idea:idea-gradle:test",
|
|
||||||
":idea:test",
|
|
||||||
":compiler:test",
|
|
||||||
":compiler:container:test",
|
|
||||||
":js:js.tests:test"
|
|
||||||
)
|
|
||||||
|
|
||||||
dependsOn(":kotlin-gradle-plugin-integration-tests:test")
|
|
||||||
if (Ide.AS40.orHigher())
|
|
||||||
dependsOn(":kotlin-ultimate:ide:android-studio-native:test")
|
|
||||||
|
|
||||||
testPatternFile = file("tests/mpp/kmm-patterns.csv")
|
|
||||||
}
|
|
||||||
|
|
||||||
register("test") {
|
register("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")
|
||||||
@@ -1051,8 +1030,7 @@ val zipTestData by task<Zip> {
|
|||||||
val zipPlugin by task<Zip> {
|
val zipPlugin by task<Zip> {
|
||||||
val src = when (project.findProperty("pluginArtifactDir") as String?) {
|
val src = when (project.findProperty("pluginArtifactDir") as String?) {
|
||||||
"Kotlin" -> ideaPluginDir
|
"Kotlin" -> ideaPluginDir
|
||||||
"KotlinUltimate" -> ideaUltimatePluginDir
|
null -> ideaPluginDir
|
||||||
null -> if (project.hasProperty("ultimate")) ideaUltimatePluginDir else ideaPluginDir
|
|
||||||
else -> error("Unsupported plugin artifact dir")
|
else -> error("Unsupported plugin artifact dir")
|
||||||
}
|
}
|
||||||
val destPath = project.findProperty("pluginZipPath") as String?
|
val destPath = project.findProperty("pluginZipPath") as String?
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ rootProject.apply {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val isTeamcityBuild = kotlinBuildProperties.isTeamcityBuild
|
val isTeamcityBuild = kotlinBuildProperties.isTeamcityBuild
|
||||||
val intellijUltimateEnabled by extra(kotlinBuildProperties.intellijUltimateEnabled)
|
|
||||||
val intellijSeparateSdks by extra(project.getBooleanProperty("intellijSeparateSdks") ?: false)
|
val intellijSeparateSdks by extra(project.getBooleanProperty("intellijSeparateSdks") ?: false)
|
||||||
|
|
||||||
extra["intellijReleaseType"] = when {
|
extra["intellijReleaseType"] = when {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ plugins {
|
|||||||
base
|
base
|
||||||
}
|
}
|
||||||
|
|
||||||
val intellijUltimateEnabled: Boolean by rootProject.extra
|
|
||||||
val intellijReleaseType: String by rootProject.extra
|
val intellijReleaseType: String by rootProject.extra
|
||||||
val intellijVersion = rootProject.extra["versions.intellijSdk"] as String
|
val intellijVersion = rootProject.extra["versions.intellijSdk"] as String
|
||||||
val intellijVersionForIde = rootProject.intellijSdkVersionForIde()
|
val intellijVersionForIde = rootProject.intellijSdkVersionForIde()
|
||||||
@@ -23,8 +22,6 @@ val asmVersion = rootProject.findProperty("versions.jar.asm-all") as String?
|
|||||||
val androidStudioRelease = rootProject.findProperty("versions.androidStudioRelease") as String?
|
val androidStudioRelease = rootProject.findProperty("versions.androidStudioRelease") as String?
|
||||||
val androidStudioBuild = rootProject.findProperty("versions.androidStudioBuild") as String?
|
val androidStudioBuild = rootProject.findProperty("versions.androidStudioBuild") as String?
|
||||||
val intellijSeparateSdks: Boolean by rootProject.extra
|
val intellijSeparateSdks: Boolean by rootProject.extra
|
||||||
val installIntellijCommunity = !intellijUltimateEnabled || intellijSeparateSdks
|
|
||||||
val installIntellijUltimate = intellijUltimateEnabled && androidStudioRelease == null
|
|
||||||
|
|
||||||
fun checkIntellijVersion(intellijVersion: String) {
|
fun checkIntellijVersion(intellijVersion: String) {
|
||||||
val intellijVersionDelimiterIndex = intellijVersion.indexOfAny(charArrayOf('.', '-'))
|
val intellijVersionDelimiterIndex = intellijVersion.indexOfAny(charArrayOf('.', '-'))
|
||||||
@@ -35,14 +32,11 @@ fun checkIntellijVersion(intellijVersion: String) {
|
|||||||
checkIntellijVersion(intellijVersion)
|
checkIntellijVersion(intellijVersion)
|
||||||
intellijVersionForIde?.let { checkIntellijVersion(it) }
|
intellijVersionForIde?.let { checkIntellijVersion(it) }
|
||||||
|
|
||||||
logger.info("intellijUltimateEnabled: $intellijUltimateEnabled")
|
|
||||||
logger.info("intellijVersion: $intellijVersion")
|
logger.info("intellijVersion: $intellijVersion")
|
||||||
logger.info("intellijVersionForIde: $intellijVersionForIde")
|
logger.info("intellijVersionForIde: $intellijVersionForIde")
|
||||||
logger.info("androidStudioRelease: $androidStudioRelease")
|
logger.info("androidStudioRelease: $androidStudioRelease")
|
||||||
logger.info("androidStudioBuild: $androidStudioBuild")
|
logger.info("androidStudioBuild: $androidStudioBuild")
|
||||||
logger.info("intellijSeparateSdks: $intellijSeparateSdks")
|
logger.info("intellijSeparateSdks: $intellijSeparateSdks")
|
||||||
logger.info("installIntellijCommunity: $installIntellijCommunity")
|
|
||||||
logger.info("installIntellijUltimate: $installIntellijUltimate")
|
|
||||||
|
|
||||||
val androidStudioOs by lazy {
|
val androidStudioOs by lazy {
|
||||||
when {
|
when {
|
||||||
@@ -78,8 +72,6 @@ repositories {
|
|||||||
|
|
||||||
val intellij by configurations.creating
|
val intellij by configurations.creating
|
||||||
val intellijForIde by configurations.creating
|
val intellijForIde by configurations.creating
|
||||||
val intellijUltimate by configurations.creating
|
|
||||||
val intellijUltimateForIde by configurations.creating
|
|
||||||
val androidStudio by configurations.creating
|
val androidStudio by configurations.creating
|
||||||
val sources by configurations.creating
|
val sources by configurations.creating
|
||||||
val sourcesForIde by configurations.creating
|
val sourcesForIde by configurations.creating
|
||||||
@@ -113,14 +105,8 @@ dependencies {
|
|||||||
|
|
||||||
androidStudio("google:android-studio-ide:$androidStudioBuild@$extension")
|
androidStudio("google:android-studio-ide:$androidStudioBuild@$extension")
|
||||||
} else {
|
} else {
|
||||||
if (installIntellijCommunity) {
|
intellij("com.jetbrains.intellij.idea:ideaIC:$intellijVersion")
|
||||||
intellij("com.jetbrains.intellij.idea:ideaIC:$intellijVersion")
|
intellijVersionForIde?.let { intellijForIde("com.jetbrains.intellij.idea:ideaIC:$it") }
|
||||||
intellijVersionForIde?.let { intellijForIde("com.jetbrains.intellij.idea:ideaIC:$it") }
|
|
||||||
}
|
|
||||||
if (installIntellijUltimate) {
|
|
||||||
intellijUltimate("com.jetbrains.intellij.idea:ideaIU:$intellijVersion")
|
|
||||||
intellijVersionForIde.let { intellijUltimateForIde("com.jetbrains.intellij.idea:ideaIU:$it") }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asmVersion != null) {
|
if (asmVersion != null) {
|
||||||
@@ -133,19 +119,14 @@ dependencies {
|
|||||||
intellijVersionForIde?.let { jpsStandaloneForIde("com.jetbrains.intellij.idea:jps-standalone:$it") }
|
intellijVersionForIde?.let { jpsStandaloneForIde("com.jetbrains.intellij.idea:jps-standalone:$it") }
|
||||||
intellijCore("com.jetbrains.intellij.idea:intellij-core:$intellijVersion")
|
intellijCore("com.jetbrains.intellij.idea:intellij-core:$intellijVersion")
|
||||||
intellijVersionForIde?.let { intellijCoreForIde("com.jetbrains.intellij.idea:intellij-core:$it") }
|
intellijVersionForIde?.let { intellijCoreForIde("com.jetbrains.intellij.idea:intellij-core:$it") }
|
||||||
if (intellijUltimateEnabled) {
|
|
||||||
nodeJSPlugin("com.jetbrains.plugins:NodeJS:${rootProject.extra["versions.idea.NodeJS"]}@zip")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun prepareDeps(
|
fun prepareDeps(
|
||||||
intellij: Configuration,
|
intellij: Configuration,
|
||||||
intellijCore: Configuration,
|
intellijCore: Configuration,
|
||||||
sources: Configuration,
|
sources: Configuration,
|
||||||
intellijUltimate: Configuration,
|
|
||||||
jpsStandalone: Configuration,
|
jpsStandalone: Configuration,
|
||||||
intellijVersion: String,
|
intellijVersion: String
|
||||||
registerNodeJSPlugin: Boolean = false
|
|
||||||
) {
|
) {
|
||||||
val makeIntellijCore = buildIvyRepositoryTask(intellijCore, customDepsOrg, customDepsRepoDir)
|
val makeIntellijCore = buildIvyRepositoryTask(intellijCore, customDepsOrg, customDepsRepoDir)
|
||||||
|
|
||||||
@@ -207,11 +188,7 @@ fun prepareDeps(
|
|||||||
::skipToplevelDirectory
|
::skipToplevelDirectory
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
val task = if (installIntellijUltimate) {
|
val task = buildIvyRepositoryTask(intellij, customDepsOrg, customDepsRepoDir, null, sourcesFile)
|
||||||
buildIvyRepositoryTask(intellijUltimate, customDepsOrg, customDepsRepoDir, null, sourcesFile)
|
|
||||||
} else {
|
|
||||||
buildIvyRepositoryTask(intellij, customDepsOrg, customDepsRepoDir, null, sourcesFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
task.configure {
|
task.configure {
|
||||||
dependsOn(mergeSources)
|
dependsOn(mergeSources)
|
||||||
@@ -230,17 +207,11 @@ fun prepareDeps(
|
|||||||
makeIntellijAnnotations
|
makeIntellijAnnotations
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (registerNodeJSPlugin && installIntellijUltimate) {
|
|
||||||
val buildNodeJsPlugin =
|
|
||||||
buildIvyRepositoryTask(nodeJSPlugin, customDepsOrg, customDepsRepoDir, ::skipToplevelDirectory, sourcesFile)
|
|
||||||
tasks.named("build") { dependsOn(buildNodeJsPlugin) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prepareDeps(intellij, intellijCore, sources, intellijUltimate, jpsStandalone, intellijVersion, registerNodeJSPlugin = true)
|
prepareDeps(intellij, intellijCore, sources, jpsStandalone, intellijVersion)
|
||||||
if (intellijVersionForIde != null) {
|
if (intellijVersionForIde != null) {
|
||||||
prepareDeps(intellijForIde, intellijCoreForIde, sourcesForIde, intellijUltimateForIde, jpsStandaloneForIde, intellijVersionForIde)
|
prepareDeps(intellijForIde, intellijCoreForIde, sourcesForIde, jpsStandaloneForIde, intellijVersionForIde)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Delete>("clean") {
|
tasks.named<Delete>("clean") {
|
||||||
|
|||||||
@@ -25,49 +25,4 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildProperties = BuildPropertiesKt.getKotlinBuildPropertiesForSettings(settings)
|
include "prepare-deps"
|
||||||
def projectVersions = file("../gradle/versions.properties").text
|
|
||||||
|
|
||||||
include "prepare-deps"
|
|
||||||
|
|
||||||
def target_AppCode_Clion = buildProperties.includeCidrPlugins && !projectVersions.contains("versions.androidStudioRelease")
|
|
||||||
def target_AndroidStudio = buildProperties.includeCidrPlugins && projectVersions.contains("versions.androidStudioRelease")
|
|
||||||
def target_IdeaUltimate = buildProperties.includeUltimate
|
|
||||||
|
|
||||||
if (target_AppCode_Clion) {
|
|
||||||
logger.info("Including modules for AC and CL in buildSrc/settings.gradle")
|
|
||||||
|
|
||||||
include ":prepare-deps:kotlin-native-platform-deps"
|
|
||||||
include ":prepare-deps:native-debug-plugin"
|
|
||||||
|
|
||||||
project(":prepare-deps:kotlin-native-platform-deps").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/kotlin-native-platform-deps")
|
|
||||||
project(":prepare-deps:native-debug-plugin").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/native-debug-plugin")
|
|
||||||
} else if (target_AndroidStudio) {
|
|
||||||
logger.info("Including modules for AS (mobile plugin) in buildSrc/settings.gradle")
|
|
||||||
|
|
||||||
include ":prepare-deps:appcode-binaries"
|
|
||||||
include ":prepare-deps:lldb-framework"
|
|
||||||
include ":prepare-deps:lldb-frontend"
|
|
||||||
|
|
||||||
project(":prepare-deps:appcode-binaries").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/appcode-binaries")
|
|
||||||
project(":prepare-deps:lldb-framework").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/lldb-framework")
|
|
||||||
project(":prepare-deps:lldb-frontend").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/lldb-frontend")
|
|
||||||
} else if (target_IdeaUltimate) {
|
|
||||||
logger.info("Including modules for IU in buildSrc/settings.gradle")
|
|
||||||
|
|
||||||
include ":prepare-deps:lldb-frontend"
|
|
||||||
include ":prepare-deps:native-debug-plugin"
|
|
||||||
|
|
||||||
project(":prepare-deps:lldb-frontend").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/lldb-frontend")
|
|
||||||
project(":prepare-deps:native-debug-plugin").projectDir =
|
|
||||||
file("${buildProperties.propertiesProvider.rootProjectDir}/kotlin-ultimate/buildSrc/prepare-deps/native-debug-plugin")
|
|
||||||
|
|
||||||
} else {
|
|
||||||
logger.info("Not including extra modules in buildSrc/settings.gradle")
|
|
||||||
}
|
|
||||||
@@ -91,12 +91,6 @@ fun Project.preloadedDeps(
|
|||||||
return files(*matchingFiles.map { it.canonicalPath }.toTypedArray())
|
return files(*matchingFiles.map { it.canonicalPath }.toTypedArray())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.ideaUltimatePreloadedDeps(vararg artifactBaseNames: String, subdir: String? = null): ConfigurableFileCollection {
|
|
||||||
val ultimateDepsDir = fileFrom(rootDir, "ultimate", "dependencies")
|
|
||||||
return if (ultimateDepsDir.isDirectory) preloadedDeps(*artifactBaseNames, baseDir = ultimateDepsDir, subdir = subdir)
|
|
||||||
else files()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.kotlinDep(artifactBaseName: String, version: String, classifier: String? = null): String =
|
fun Project.kotlinDep(artifactBaseName: String, version: String, classifier: String? = null): String =
|
||||||
listOfNotNull("org.jetbrains.kotlin:kotlin-$artifactBaseName:$version", classifier).joinToString(":")
|
listOfNotNull("org.jetbrains.kotlin:kotlin-$artifactBaseName:$version", classifier).joinToString(":")
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ private fun Project.kotlinBuildLocalRepoDir(): File = kotlinBuildLocalDependenci
|
|||||||
|
|
||||||
fun Project.ideModuleName() = when (IdeVersionConfigurator.currentIde.kind) {
|
fun Project.ideModuleName() = when (IdeVersionConfigurator.currentIde.kind) {
|
||||||
Ide.Kind.AndroidStudio -> "android-studio-ide"
|
Ide.Kind.AndroidStudio -> "android-studio-ide"
|
||||||
Ide.Kind.IntelliJ -> {
|
Ide.Kind.IntelliJ -> "ideaIC"
|
||||||
if (kotlinBuildProperties.intellijUltimateEnabled) "ideaIU" else "ideaIC"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Project.ideModuleVersion(forIde: Boolean) = when (IdeVersionConfigurator.currentIde.kind) {
|
private fun Project.ideModuleVersion(forIde: Boolean) = when (IdeVersionConfigurator.currentIde.kind) {
|
||||||
@@ -110,10 +108,6 @@ fun Project.intellijRuntimeAnnotations() = "kotlin.build:intellij-runtime-annota
|
|||||||
|
|
||||||
fun Project.intellijPluginDep(plugin: String, forIde: Boolean = false) = intellijDep(plugin, forIde)
|
fun Project.intellijPluginDep(plugin: String, forIde: Boolean = false) = intellijDep(plugin, forIde)
|
||||||
|
|
||||||
fun Project.intellijUltimateDep() = intellijDep("ideaIU")
|
|
||||||
|
|
||||||
fun Project.intellijUltimatePluginDep(plugin: String) = intellijDep(plugin)
|
|
||||||
|
|
||||||
fun ModuleDependency.includeJars(vararg names: String, rootProject: Project? = null) {
|
fun ModuleDependency.includeJars(vararg names: String, rootProject: Project? = null) {
|
||||||
names.forEach {
|
names.forEach {
|
||||||
var baseName = it.removeSuffix(".jar")
|
var baseName = it.removeSuffix(".jar")
|
||||||
@@ -152,19 +146,8 @@ fun ModuleDependency.includeIntellijCoreJarDependencies(project: Project, jarsFi
|
|||||||
rootProject = project.rootProject
|
rootProject = project.rootProject
|
||||||
)
|
)
|
||||||
|
|
||||||
fun Project.isIntellijCommunityAvailable() =
|
|
||||||
!(rootProject.extra["intellijUltimateEnabled"] as Boolean) || rootProject.extra["intellijSeparateSdks"] as Boolean
|
|
||||||
|
|
||||||
fun Project.isIntellijUltimateSdkAvailable() = (rootProject.extra["intellijUltimateEnabled"] as Boolean)
|
|
||||||
|
|
||||||
fun Project.intellijRootDir() = IntellijRootUtils.getIntellijRootDir(project)
|
fun Project.intellijRootDir() = IntellijRootUtils.getIntellijRootDir(project)
|
||||||
|
|
||||||
fun Project.intellijUltimateRootDir() =
|
|
||||||
if (isIntellijUltimateSdkAvailable())
|
|
||||||
File(kotlinBuildLocalRepoDir(), "kotlin.build/ideaIU/${rootProject.extra["versions.intellijSdk"]}/artifacts")
|
|
||||||
else
|
|
||||||
throw GradleException("intellij ultimate SDK is not available")
|
|
||||||
|
|
||||||
fun DependencyHandlerScope.excludeInAndroidStudio(rootProject: Project, block: DependencyHandlerScope.() -> Unit) {
|
fun DependencyHandlerScope.excludeInAndroidStudio(rootProject: Project, block: DependencyHandlerScope.() -> Unit) {
|
||||||
if (!rootProject.extra.has("versions.androidStudioRelease")) {
|
if (!rootProject.extra.has("versions.androidStudioRelease")) {
|
||||||
block()
|
block()
|
||||||
@@ -198,7 +181,7 @@ fun Project.runIdeTask(name: String, ideaPluginDir: File, ideaSandboxDir: File,
|
|||||||
"-Dplugin.path=${ideaPluginDir.absolutePath}"
|
"-Dplugin.path=${ideaPluginDir.absolutePath}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (Platform[201].orHigher() && !isIntellijUltimateSdkAvailable()) {
|
if (Platform[201].orHigher()) {
|
||||||
jvmArgs("-Didea.platform.prefix=Idea")
|
jvmArgs("-Didea.platform.prefix=Idea")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,18 +174,14 @@ class CodeConformanceTest : TestCase() {
|
|||||||
|
|
||||||
val atAuthorPattern = Pattern.compile("/\\*.+@author.+\\*/", Pattern.DOTALL)
|
val atAuthorPattern = Pattern.compile("/\\*.+@author.+\\*/", Pattern.DOTALL)
|
||||||
|
|
||||||
val root = nonSourcesMatcher.root
|
|
||||||
|
|
||||||
val tests = listOf(
|
val tests = listOf(
|
||||||
TestData(
|
TestData(
|
||||||
"%d source files contain @author javadoc tag.\nPlease remove them or exclude in this test:\n%s"
|
"%d source files contain @author javadoc tag.\nPlease remove them or exclude in this test:\n%s"
|
||||||
) { file, source ->
|
) { _, source ->
|
||||||
// substring check is an optimization
|
// substring check is an optimization
|
||||||
"@author" in source && atAuthorPattern.matcher(source).find() &&
|
"@author" in source && atAuthorPattern.matcher(source).find() &&
|
||||||
"ASM: a very small and fast Java bytecode manipulation framework" !in source &&
|
"ASM: a very small and fast Java bytecode manipulation framework" !in source &&
|
||||||
"package org.jetbrains.kotlin.tools.projectWizard.settings.version.maven" !in source &&
|
"package org.jetbrains.kotlin.tools.projectWizard.settings.version.maven" !in source
|
||||||
!file.relativeTo(root).systemIndependentPath.startsWith("kotlin-ultimate/ide/common-cidr-native") &&
|
|
||||||
file.name != "CLionKonanProjectDataService.kt"
|
|
||||||
},
|
},
|
||||||
TestData(
|
TestData(
|
||||||
"%d source files use something from com.beust.jcommander.internal package.\n" +
|
"%d source files use something from com.beust.jcommander.internal package.\n" +
|
||||||
@@ -358,7 +354,7 @@ class CodeConformanceTest : TestCase() {
|
|||||||
|
|
||||||
if (repoOccurrences.isNotEmpty()) {
|
if (repoOccurrences.isNotEmpty()) {
|
||||||
val repoOccurrencesStableOrder = repoOccurrences
|
val repoOccurrencesStableOrder = repoOccurrences
|
||||||
.map { RepoOccurrences(it.repo, it.files.sortedBy { it.path }) }
|
.map { occurrence -> RepoOccurrences(occurrence.repo, occurrence.files.sortedBy { file -> file.path }) }
|
||||||
.sortedBy { it.repo }
|
.sortedBy { it.repo }
|
||||||
fail(
|
fail(
|
||||||
buildString {
|
buildString {
|
||||||
@@ -400,4 +396,4 @@ class CodeConformanceTest : TestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun String.ensureFileOrEndsWithSlash() =
|
private fun String.ensureFileOrEndsWithSlash() =
|
||||||
if (endsWith("/") || "." in substringAfterLast('/')) this else this + "/"
|
if (endsWith("/") || "." in substringAfterLast('/')) this else "$this/"
|
||||||
|
|||||||
@@ -50,17 +50,8 @@ class KotlinBuildProperties(
|
|||||||
val isInJpsBuildIdeaSync: Boolean
|
val isInJpsBuildIdeaSync: Boolean
|
||||||
get() = isJpsBuildEnabled && isInIdeaSync
|
get() = isJpsBuildEnabled && isInIdeaSync
|
||||||
|
|
||||||
private val kotlinUltimateExists: Boolean = propertiesProvider.rootProjectDir.resolve("kotlin-ultimate").exists()
|
|
||||||
|
|
||||||
val isTeamcityBuild: Boolean = getBoolean("teamcity") || System.getenv("TEAMCITY_VERSION") != null
|
val isTeamcityBuild: Boolean = getBoolean("teamcity") || System.getenv("TEAMCITY_VERSION") != null
|
||||||
|
|
||||||
val intellijUltimateEnabled: Boolean = getBoolean("intellijUltimateEnabled", isTeamcityBuild) ||
|
|
||||||
getBoolean("kotlin.build.dependencies.iu.enabled", isTeamcityBuild)
|
|
||||||
|
|
||||||
val includeCidrPlugins: Boolean = kotlinUltimateExists && getBoolean("cidrPluginsEnabled")
|
|
||||||
|
|
||||||
val includeUltimate: Boolean = kotlinUltimateExists && (isTeamcityBuild || intellijUltimateEnabled)
|
|
||||||
|
|
||||||
val buildCacheUrl: String? = getOrNull("kotlin.build.cache.url") as String?
|
val buildCacheUrl: String? = getOrNull("kotlin.build.cache.url") as String?
|
||||||
|
|
||||||
val pushToBuildCache: Boolean = getBoolean("kotlin.build.cache.push", isTeamcityBuild)
|
val pushToBuildCache: Boolean = getBoolean("kotlin.build.cache.push", isTeamcityBuild)
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ val ideaSandboxDir: File by extra
|
|||||||
val ideaSdkPath: String
|
val ideaSdkPath: String
|
||||||
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
||||||
|
|
||||||
val intellijUltimateEnabled: Boolean by rootProject.extra
|
|
||||||
val ideaUltimatePluginDir: File by rootProject.extra
|
|
||||||
val ideaUltimateSandboxDir: File by rootProject.extra
|
|
||||||
|
|
||||||
fun JUnit.configureForKotlin(xmx: String = "1600m") {
|
fun JUnit.configureForKotlin(xmx: String = "1600m") {
|
||||||
vmParameters = listOf(
|
vmParameters = listOf(
|
||||||
"-ea",
|
"-ea",
|
||||||
@@ -230,10 +226,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
|
|
||||||
idea("[JPS] IDEA (No ProcessCanceledException)", ideaSandboxDir, ideaPluginDir, disableProcessCanceledException = true)
|
idea("[JPS] IDEA (No ProcessCanceledException)", ideaSandboxDir, ideaPluginDir, disableProcessCanceledException = true)
|
||||||
|
|
||||||
if (intellijUltimateEnabled) {
|
|
||||||
idea("[JPS] IDEA Ultimate", ideaUltimateSandboxDir, ideaPluginDir)
|
|
||||||
}
|
|
||||||
|
|
||||||
defaults<JUnit> {
|
defaults<JUnit> {
|
||||||
configureForKotlin()
|
configureForKotlin()
|
||||||
}
|
}
|
||||||
@@ -245,14 +237,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
|
|||||||
configureForKotlin()
|
configureForKotlin()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intellijUltimateEnabled) {
|
|
||||||
junit("[JPS] All IDEA Ultimate Plugin Tests") {
|
|
||||||
moduleName = "kotlin.ultimate.test"
|
|
||||||
pattern = "org.jetbrains.kotlin.*"
|
|
||||||
configureForKotlin()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
junit("[JPS] Compiler Tests") {
|
junit("[JPS] Compiler Tests") {
|
||||||
moduleName = "kotlin.compiler.test"
|
moduleName = "kotlin.compiler.test"
|
||||||
pattern = "org.jetbrains.kotlin.*"
|
pattern = "org.jetbrains.kotlin.*"
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ val ideaSandboxDir: File by extra
|
|||||||
val ideaSdkPath: String
|
val ideaSdkPath: String
|
||||||
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
get() = IntellijRootUtils.getIntellijRootDir(rootProject).absolutePath
|
||||||
|
|
||||||
val intellijUltimateEnabled: Boolean by rootProject.extra
|
|
||||||
val ideaUltimatePluginDir: File by rootProject.extra
|
|
||||||
val ideaUltimateSandboxDir: File by rootProject.extra
|
|
||||||
|
|
||||||
val pathToKotlinModularizedTestData = kotlinBuildProperties.pathToKotlinModularizedTestData
|
val pathToKotlinModularizedTestData = kotlinBuildProperties.pathToKotlinModularizedTestData
|
||||||
|
|
||||||
fun MutableList<String>.addModularizedTestArgs(prefix: String, benchFilter: String?) {
|
fun MutableList<String>.addModularizedTestArgs(prefix: String, benchFilter: String?) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -37,28 +37,14 @@ val distKotlinHomeDir by extra("$distDir/kotlinc")
|
|||||||
val distLibDir = "$distKotlinHomeDir/lib"
|
val distLibDir = "$distKotlinHomeDir/lib"
|
||||||
val commonLocalDataDir = "$rootDir/local"
|
val commonLocalDataDir = "$rootDir/local"
|
||||||
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
||||||
val ideaUltimateSandboxDir = "$commonLocalDataDir/ideaUltimateSandbox"
|
|
||||||
val clionSandboxDir = "$commonLocalDataDir/clionSandbox"
|
|
||||||
val appcodeSandboxDir = "$commonLocalDataDir/appcodeSandbox"
|
|
||||||
val ideaPluginDir = "$distDir/artifacts/ideaPlugin/Kotlin"
|
val ideaPluginDir = "$distDir/artifacts/ideaPlugin/Kotlin"
|
||||||
val ideaUltimatePluginDir = "$distDir/artifacts/ideaUltimatePlugin/Kotlin"
|
|
||||||
val cidrPluginDir = "$distDir/artifacts/cidrPlugin/Kotlin"
|
|
||||||
val appcodePluginDir = "$distDir/artifacts/appcodePlugin/Kotlin"
|
|
||||||
val clionPluginDir = "$distDir/artifacts/clionPlugin/Kotlin"
|
|
||||||
|
|
||||||
// TODO: use "by extra()" syntax where possible
|
// TODO: use "by extra()" syntax where possible
|
||||||
extra["distLibDir"] = project.file(distLibDir)
|
extra["distLibDir"] = project.file(distLibDir)
|
||||||
extra["libsDir"] = project.file(distLibDir)
|
extra["libsDir"] = project.file(distLibDir)
|
||||||
extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
||||||
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
extra["ideaSandboxDir"] = project.file(ideaSandboxDir)
|
||||||
extra["ideaUltimateSandboxDir"] = project.file(ideaUltimateSandboxDir)
|
|
||||||
extra["clionSandboxDir"] = project.file(ideaSandboxDir)
|
|
||||||
extra["appcodeSandboxDir"] = project.file(ideaSandboxDir)
|
|
||||||
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
extra["ideaPluginDir"] = project.file(ideaPluginDir)
|
||||||
extra["ideaUltimatePluginDir"] = project.file(ideaUltimatePluginDir)
|
|
||||||
extra["cidrPluginDir"] = project.file(cidrPluginDir)
|
|
||||||
extra["appcodePluginDir"] = project.file(appcodePluginDir)
|
|
||||||
extra["clionPluginDir"] = project.file(clionPluginDir)
|
|
||||||
extra["isSonatypeRelease"] = false
|
extra["isSonatypeRelease"] = false
|
||||||
|
|
||||||
// Work-around necessary to avoid setting null javaHome. Will be removed after support of lazy task configuration
|
// Work-around necessary to avoid setting null javaHome. Will be removed after support of lazy task configuration
|
||||||
@@ -85,13 +71,11 @@ extra["versions.markdown"] = "0.1.25"
|
|||||||
extra["versions.trove4j"] = "1.0.20181211"
|
extra["versions.trove4j"] = "1.0.20181211"
|
||||||
|
|
||||||
val isTeamcityBuild = false
|
val isTeamcityBuild = false
|
||||||
val intellijUltimateEnabled = false
|
|
||||||
val effectSystemEnabled by extra(false)
|
val effectSystemEnabled by extra(false)
|
||||||
val newInferenceEnabled by extra(false)
|
val newInferenceEnabled by extra(false)
|
||||||
|
|
||||||
val intellijSeparateSdks = false
|
val intellijSeparateSdks = false
|
||||||
|
|
||||||
extra["intellijUltimateEnabled"] = intellijUltimateEnabled
|
|
||||||
extra["intellijSeparateSdks"] = intellijSeparateSdks
|
extra["intellijSeparateSdks"] = intellijSeparateSdks
|
||||||
|
|
||||||
extra["IntellijCoreDependencies"] =
|
extra["IntellijCoreDependencies"] =
|
||||||
@@ -276,10 +260,6 @@ tasks {
|
|||||||
create("cleanupArtifacts") {
|
create("cleanupArtifacts") {
|
||||||
doLast {
|
doLast {
|
||||||
delete(ideaPluginDir)
|
delete(ideaPluginDir)
|
||||||
delete(ideaUltimatePluginDir)
|
|
||||||
delete(cidrPluginDir)
|
|
||||||
delete(appcodePluginDir)
|
|
||||||
delete(clionPluginDir)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -420,43 +420,6 @@ if (!buildProperties.getBoolean("disableKotlinPluginModules", false) && buildPro
|
|||||||
logger.info("Old Kotlin plugin modules are disabled")
|
logger.info("Old Kotlin plugin modules are disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildProperties.includeCidrPlugins) {
|
|
||||||
logger.info("Including CIDR modules in settings.gradle")
|
|
||||||
include ":kotlin-ultimate:ide:cidr-gradle-tooling",
|
|
||||||
":kotlin-ultimate:ide:common-native",
|
|
||||||
":kotlin-ultimate:ide:common-cidr-mobile",
|
|
||||||
":kotlin-ultimate:ide:common-cidr-native",
|
|
||||||
":kotlin-ultimate:ide:common-cidr-swift-native",
|
|
||||||
":kotlin-ultimate:ide:common-noncidr-native",
|
|
||||||
":kotlin-ultimate:ide:appcode-native",
|
|
||||||
":kotlin-ultimate:ide:mobile-native",
|
|
||||||
":kotlin-ultimate:prepare:cidr-plugin",
|
|
||||||
":kotlin-ultimate:prepare:appcode-plugin",
|
|
||||||
":kotlin-ultimate:prepare:mobile-plugin",
|
|
||||||
":kotlin-ultimate:libraries:tools:apple-gradle-plugin-api"
|
|
||||||
|
|
||||||
if (projectVersions.contains("versions.androidStudioRelease")) {
|
|
||||||
logger.info("Including KMM modules in settings.gradle")
|
|
||||||
include ":kotlin-ultimate:ide:android-studio-native",
|
|
||||||
":kotlin-ultimate:prepare:kmm-plugin"
|
|
||||||
} else {
|
|
||||||
logger.info("NOT including KMM modules in settings.gradle")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.info("NOT including CIDR modules in settings.gradle")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buildProperties.includeUltimate) {
|
|
||||||
include ":kotlin-ultimate:ultimate",
|
|
||||||
":kotlin-ultimate:ultimate:ultimate-runner",
|
|
||||||
":kotlin-ultimate:ide:common-native",
|
|
||||||
":kotlin-ultimate:ide:common-noncidr-native",
|
|
||||||
":kotlin-ultimate:ide:ultimate-native"
|
|
||||||
logger.info("Including extension for IJ Ultimate in settings.gradle")
|
|
||||||
} else {
|
|
||||||
logger.info("NOT including extension for IJ Ultimate in settings.gradle")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buildProperties.inJpsBuildIdeaSync) {
|
if (buildProperties.inJpsBuildIdeaSync) {
|
||||||
include ":kotlin-stdlib:jps-build"
|
include ":kotlin-stdlib:jps-build"
|
||||||
project(":kotlin-stdlib:jps-build").projectDir = "$rootDir/libraries/stdlib/jps-build" as File
|
project(":kotlin-stdlib:jps-build").projectDir = "$rootDir/libraries/stdlib/jps-build" as File
|
||||||
|
|||||||
Reference in New Issue
Block a user