CLion/AppCode: Added kotlin-ultimate repository.
This commit is contained in:
committed by
Dmitriy Dolovov
parent
7b108541a9
commit
632dcc31bd
@@ -38,3 +38,4 @@ build/
|
||||
.idea/compiler.xml
|
||||
.idea/inspectionProfiles/profiles_settings.xml
|
||||
.idea/.name
|
||||
kotlin-ultimate/
|
||||
|
||||
Generated
+2
-2
@@ -24,6 +24,6 @@
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/kotlin-ultimate" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
||||
</project>
|
||||
+43
-6
@@ -76,9 +76,17 @@ allprojects {
|
||||
extra["kotlin_root"] = rootDir
|
||||
|
||||
val cidrKotlinPlugin by configurations.creating
|
||||
val appcodeKotlinPlugin by configurations.creating
|
||||
val clionKotlinPlugin by configurations.creating
|
||||
|
||||
val includeCidr by extra(project.getBooleanProperty("cidrPluginsEnabled") ?: false)
|
||||
|
||||
dependencies {
|
||||
cidrKotlinPlugin(project(":prepare:cidr-plugin", "runtimeJar"))
|
||||
if (includeCidr) {
|
||||
cidrKotlinPlugin(project(":prepare:cidr-plugin", "runtimeJar"))
|
||||
appcodeKotlinPlugin(project(":prepare:appcode-plugin", "runtimeJar"))
|
||||
clionKotlinPlugin(project(":prepare:clion-plugin", "runtimeJar"))
|
||||
}
|
||||
}
|
||||
|
||||
val commonBuildDir = File(rootDir, "build")
|
||||
@@ -88,9 +96,13 @@ val distLibDir = "$distKotlinHomeDir/lib"
|
||||
val commonLocalDataDir = "$rootDir/local"
|
||||
val ideaSandboxDir = "$commonLocalDataDir/ideaSandbox"
|
||||
val ideaUltimateSandboxDir = "$commonLocalDataDir/ideaUltimateSandbox"
|
||||
val clionSandboxDir = "$commonLocalDataDir/clionSandbox"
|
||||
val appcodeSandboxDir = "$commonLocalDataDir/appcodeSandbox"
|
||||
val ideaPluginDir = "$distDir/artifacts/ideaPlugin/Kotlin"
|
||||
val ideaUltimatePluginDir = "$distDir/artifacts/ideaUltimatePlugin/Kotlin"
|
||||
val cidrPluginDir = "$distDir/artifacts/cidrPlugin/Kotlin"
|
||||
val appcodePluginDir = "$distDir/artifacts/appcodePlugin/kotlinNative-appcode"
|
||||
val clionPluginDir = "$distDir/artifacts/clionPlugin/kotlinNative-clion"
|
||||
|
||||
// TODO: use "by extra()" syntax where possible
|
||||
extra["distLibDir"] = project.file(distLibDir)
|
||||
@@ -98,9 +110,13 @@ extra["libsDir"] = project.file(distLibDir)
|
||||
extra["commonLocalDataDir"] = project.file(commonLocalDataDir)
|
||||
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["ideaUltimatePluginDir"] = project.file(ideaUltimatePluginDir)
|
||||
extra["cidrPluginDir"] = project.file(cidrPluginDir)
|
||||
extra["appcodePluginDir"] = project.file(appcodePluginDir)
|
||||
extra["clionPluginDir"] = project.file(clionPluginDir)
|
||||
extra["isSonatypeRelease"] = false
|
||||
|
||||
// Work-around necessary to avoid setting null javaHome. Will be removed after support of lazy task configuration
|
||||
@@ -431,6 +447,8 @@ tasks {
|
||||
delete(ideaPluginDir)
|
||||
delete(ideaUltimatePluginDir)
|
||||
delete(cidrPluginDir)
|
||||
delete(appcodePluginDir)
|
||||
delete(clionPluginDir)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,9 +651,19 @@ val zipPlugin by task<Zip> {
|
||||
}
|
||||
}
|
||||
|
||||
val cidrPlugin by task<Copy> {
|
||||
fun cidrPlugin(product: String, pluginDir: String) = tasks.creating(Copy::class.java) {
|
||||
if (!includeCidr) {
|
||||
throw GradleException("CIDR plugins require 'cidrPluginsEnabled' property turned on")
|
||||
}
|
||||
val prepareCidrPlugin = getTasksByName("cidrPlugin", true)
|
||||
val prepareCurrentPlugin = (getTasksByName(product.toLowerCase() + "Plugin", true) - this)
|
||||
prepareCurrentPlugin.forEach { it.mustRunAfter(prepareCidrPlugin) }
|
||||
|
||||
dependsOn(ideaPlugin)
|
||||
into(cidrPluginDir)
|
||||
dependsOn(prepareCidrPlugin)
|
||||
dependsOn(prepareCurrentPlugin)
|
||||
|
||||
into(pluginDir)
|
||||
from(ideaPluginDir) {
|
||||
exclude("lib/kotlin-plugin.jar")
|
||||
|
||||
@@ -651,17 +679,18 @@ val cidrPlugin by task<Copy> {
|
||||
exclude("lib/maven-ide.jar")
|
||||
}
|
||||
from(cidrKotlinPlugin) { into("lib") }
|
||||
from(configurations[product.toLowerCase() + "KotlinPlugin"]) { into("lib") }
|
||||
}
|
||||
|
||||
val zipCidrPlugin by task<Zip> {
|
||||
fun zipCidrPlugin(product: String) = tasks.creating(Zip::class.java) {
|
||||
val destPath = project.findProperty("pluginZipPath") as String?
|
||||
?: "$distDir/artifacts/kotlin-plugin-$kotlinVersion-CIDR.zip"
|
||||
?: "$distDir/artifacts/kotlinNative-plugin-$kotlinVersion-$product.zip"
|
||||
val destFile = File(destPath)
|
||||
|
||||
destinationDir = destFile.parentFile
|
||||
archiveName = destFile.name
|
||||
|
||||
from(cidrPlugin)
|
||||
from(tasks[product.toLowerCase() + "Plugin"])
|
||||
into("Kotlin")
|
||||
setExecutablePermissions()
|
||||
|
||||
@@ -670,6 +699,14 @@ val zipCidrPlugin by task<Zip> {
|
||||
}
|
||||
}
|
||||
|
||||
if (includeCidr) {
|
||||
val appcodePlugin by cidrPlugin("AppCode", appcodePluginDir)
|
||||
val zipAppCodePlugin by zipCidrPlugin("AppCode")
|
||||
|
||||
val clionPlugin by cidrPlugin("CLion", clionPluginDir)
|
||||
val zipCLionPlugin by zipCidrPlugin("CLion")
|
||||
}
|
||||
|
||||
configure<IdeaModel> {
|
||||
module {
|
||||
excludeDirs = files(
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.parallel=false
|
||||
org.gradle.configureondemand=false
|
||||
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx1600m
|
||||
|
||||
cacheRedirectorEnabled=true
|
||||
|
||||
kotlin.compiler.effectSystemEnabled=true
|
||||
kotlin.compiler.newInferenceEnabled=true
|
||||
#maven.repository.mirror=http://repository.jetbrains.com/remote-repos/
|
||||
#bootstrap.kotlin.repo=https://dl.bintray.com/kotlin/kotlin-dev
|
||||
#bootstrap.kotlin.version=1.1.50-dev-1451
|
||||
#signingRequired=true
|
||||
|
||||
cidrPluginsEnabled=true
|
||||
@@ -17,6 +17,10 @@ dependencies {
|
||||
|
||||
val ideaPluginDir: File by rootProject.extra
|
||||
val ideaSandboxDir: File by rootProject.extra
|
||||
val clionPluginDir: File by rootProject.extra
|
||||
val clionSandboxDir: File by rootProject.extra
|
||||
val appcodePluginDir: File by rootProject.extra
|
||||
val appcodeSandboxDir: File by rootProject.extra
|
||||
|
||||
runIdeTask("runIde", ideaPluginDir, ideaSandboxDir) {
|
||||
dependsOn(":dist", ":ideaPlugin")
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.github.jk1.tcdeps.KotlinScriptDslAdapter.teamcityServer
|
||||
import com.github.jk1.tcdeps.KotlinScriptDslAdapter.tc
|
||||
import org.gradle.kotlin.dsl.support.zipTo
|
||||
|
||||
apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.jk1.tcdeps") version "0.17"
|
||||
}
|
||||
|
||||
repositories {
|
||||
teamcityServer {
|
||||
setUrl("http://buildserver.labs.intellij.net")
|
||||
credentials {
|
||||
username = "guest"
|
||||
password = "guest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val cidrPluginDir: File by rootProject.extra
|
||||
val appcodePluginDir: File by rootProject.extra
|
||||
val appcodeVersion = rootProject.extra["versions.appcode"] as String
|
||||
val appcodeVersionRepo = rootProject.extra["versions.appcode.repo"] as String
|
||||
|
||||
val cidrPlugin by configurations.creating
|
||||
val platformDepsZip by configurations.creating
|
||||
|
||||
val pluginXmlPath = "META-INF/plugin.xml"
|
||||
val platformDepsJarName = "kotlinNative-platformDeps.jar"
|
||||
|
||||
// Do not rename, used in JPS importer
|
||||
val projectsToShadow by extra(listOf(
|
||||
":kotlin-ultimate:cidr-native",
|
||||
":kotlin-ultimate:appcode-native"))
|
||||
|
||||
|
||||
dependencies {
|
||||
cidrPlugin(project(":prepare:cidr-plugin"))
|
||||
platformDepsZip(tc("$appcodeVersionRepo:$appcodeVersion:OC-plugins/kotlinNative-platformDeps-$appcodeVersion.zip"))
|
||||
}
|
||||
|
||||
val kotlinPluginXml by tasks.creating {
|
||||
inputs.files(cidrPlugin)
|
||||
outputs.files(fileFrom(buildDir, name, "META-INF/KotlinPlugin.xml"))
|
||||
|
||||
doFirst {
|
||||
val pluginXmlText = zipTree(inputs.files.singleFile)
|
||||
.matching { include(pluginXmlPath) }
|
||||
.singleFile
|
||||
.readText()
|
||||
outputs.files.singleFile.writeText(pluginXmlText)
|
||||
}
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
archiveName = "kotlin-plugin.jar"
|
||||
dependsOn(cidrPlugin)
|
||||
from(kotlinPluginXml) { into("META-INF") }
|
||||
|
||||
from {
|
||||
zipTree(cidrPlugin.singleFile).matching {
|
||||
exclude(pluginXmlPath)
|
||||
}
|
||||
}
|
||||
|
||||
for (p in projectsToShadow) {
|
||||
dependsOn("$p:classes")
|
||||
from(getSourceSetsFrom(p)["main"].output)
|
||||
}
|
||||
}
|
||||
|
||||
val platformDepsJar by task<Zip> {
|
||||
archiveName = platformDepsJarName
|
||||
val platformDepsJar = zipTree(platformDepsZip.singleFile).matching { include("**/$platformDepsJarName") }.singleFile
|
||||
from(zipTree(platformDepsJar)) {
|
||||
exclude(pluginXmlPath)
|
||||
}
|
||||
}
|
||||
|
||||
task<Copy>("appcodePlugin") {
|
||||
into(appcodePluginDir)
|
||||
from(cidrPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||
from(jar) { into("lib") }
|
||||
from(platformDepsJar) { into("lib") }
|
||||
from(zipTree(platformDepsZip.singleFile).files) {
|
||||
exclude("**/$platformDepsJarName")
|
||||
into("lib")
|
||||
}
|
||||
from(File(project(":kotlin-ultimate:appcode-native").projectDir, "templates")) { into("templates") }
|
||||
}
|
||||
@@ -22,7 +22,7 @@ dependencies {
|
||||
val pluginXml by tasks.creating {
|
||||
val kotlinVersion: String by rootProject.extra
|
||||
val pluginFullVersionNumber = findProperty("pluginVersion") as? String
|
||||
?: "$kotlinVersion-CIDR"
|
||||
?: "$kotlinVersion-CIDR"
|
||||
|
||||
inputs.property("pluginFullVersionNumber", pluginFullVersionNumber)
|
||||
inputs.files(kotlinPlugin)
|
||||
@@ -30,8 +30,8 @@ val pluginXml by tasks.creating {
|
||||
|
||||
doFirst {
|
||||
val placeholderRegex = Regex(
|
||||
"""<!-- CIDR-PLUGIN-PLACEHOLDER-START -->(.*)<!-- CIDR-PLUGIN-PLACEHOLDER-END -->""",
|
||||
RegexOption.DOT_MATCHES_ALL)
|
||||
"""<!-- CIDR-PLUGIN-PLACEHOLDER-START -->(.*)<!-- CIDR-PLUGIN-PLACEHOLDER-END -->""",
|
||||
RegexOption.DOT_MATCHES_ALL)
|
||||
|
||||
val excludeRegex = Regex(
|
||||
"""<!-- CIDR-PLUGIN-EXCLUDE-START -->(.*?)<!-- CIDR-PLUGIN-EXCLUDE-END -->""",
|
||||
@@ -65,6 +65,5 @@ val jar = runtimeJar {
|
||||
|
||||
task<Copy>("cidrPlugin") {
|
||||
into(cidrPluginDir)
|
||||
from(ideaPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||
from(jar) { into("lib") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.github.jk1.tcdeps.KotlinScriptDslAdapter.teamcityServer
|
||||
import com.github.jk1.tcdeps.KotlinScriptDslAdapter.tc
|
||||
|
||||
apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.jk1.tcdeps") version "0.17"
|
||||
}
|
||||
|
||||
repositories {
|
||||
teamcityServer {
|
||||
setUrl("http://buildserver.labs.intellij.net")
|
||||
credentials {
|
||||
username = "guest"
|
||||
password = "guest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val cidrPluginDir: File by rootProject.extra
|
||||
val clionPluginDir: File by rootProject.extra
|
||||
val clionVersion = rootProject.extra["versions.clion"] as String
|
||||
val clionVersionRepo = rootProject.extra["versions.clion.repo"] as String
|
||||
|
||||
val cidrPlugin by configurations.creating
|
||||
val platformDepsZip by configurations.creating
|
||||
|
||||
val pluginXmlPath = "META-INF/plugin.xml"
|
||||
val platformDepsJarName = "kotlinNative-platformDeps.jar"
|
||||
|
||||
// Do not rename, used in JPS importer
|
||||
val projectsToShadow by extra(listOf(
|
||||
":kotlin-ultimate:cidr-native",
|
||||
":kotlin-ultimate:clion-native"))
|
||||
|
||||
|
||||
dependencies {
|
||||
cidrPlugin(project(":prepare:cidr-plugin"))
|
||||
platformDepsZip(tc("$clionVersionRepo:$clionVersion:CL-plugins/kotlinNative-platformDeps-$clionVersion.zip"))
|
||||
}
|
||||
|
||||
val kotlinPluginXml by tasks.creating {
|
||||
inputs.files(cidrPlugin)
|
||||
outputs.files(fileFrom(buildDir, name, "META-INF/KotlinPlugin.xml"))
|
||||
|
||||
doFirst {
|
||||
val pluginXmlText = zipTree(inputs.files.singleFile)
|
||||
.matching { include(pluginXmlPath) }
|
||||
.singleFile
|
||||
.readText()
|
||||
outputs.files.singleFile.writeText(pluginXmlText)
|
||||
}
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
archiveName = "kotlin-plugin.jar"
|
||||
dependsOn(cidrPlugin)
|
||||
from(kotlinPluginXml) { into("META-INF") }
|
||||
|
||||
from {
|
||||
zipTree(cidrPlugin.singleFile).matching {
|
||||
exclude(pluginXmlPath)
|
||||
}
|
||||
}
|
||||
|
||||
for (p in projectsToShadow) {
|
||||
dependsOn("$p:classes")
|
||||
from(getSourceSetsFrom(p)["main"].output)
|
||||
}
|
||||
}
|
||||
|
||||
val platformDepsJar by task<Zip> {
|
||||
archiveName = platformDepsJarName
|
||||
val platformDepsJar = zipTree(platformDepsZip.singleFile).matching { include("**/$platformDepsJarName") }.singleFile
|
||||
from(zipTree(platformDepsJar)) {
|
||||
exclude(pluginXmlPath)
|
||||
}
|
||||
}
|
||||
|
||||
task<Copy>("clionPlugin") {
|
||||
into(clionPluginDir)
|
||||
from(cidrPluginDir) { exclude("lib/kotlin-plugin.jar") }
|
||||
from(jar) { into("lib") }
|
||||
from(platformDepsJar) { into("lib") }
|
||||
from(zipTree(platformDepsZip.singleFile).files) {
|
||||
exclude("**/$platformDepsJarName")
|
||||
into("lib")
|
||||
}
|
||||
from(File(project(":kotlin-ultimate:clion-native").projectDir, "templates")) { into("templates") }
|
||||
}
|
||||
@@ -208,6 +208,17 @@ include ":kotlin-build-common",
|
||||
":kotlin-serialization-unshaded",
|
||||
":kotlin-idl2k"
|
||||
|
||||
|
||||
def includeCidr = hasProperty("cidrPluginsEnabled") && cidrPluginsEnabled != 'false'
|
||||
if (includeCidr) {
|
||||
include ":kotlin-ultimate:cidr-native",
|
||||
":kotlin-ultimate:appcode-native",
|
||||
":kotlin-ultimate:clion-native",
|
||||
":prepare:cidr-plugin",
|
||||
":prepare:appcode-plugin",
|
||||
":prepare:clion-plugin"
|
||||
}
|
||||
|
||||
def isTeamcityBuild = hasProperty("teamcity") || System.getenv("TEAMCITY_VERSION") != null
|
||||
def includeUltimate = hasProperty("intellijUltimateEnabled") && intellijUltimateEnabled != 'false'
|
||||
if (isTeamcityBuild || includeUltimate) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
versions.intellijSdk=183.4284.36
|
||||
versions.androidBuildTools=r23.0.1
|
||||
versions.idea.NodeJS=181.3494.12
|
||||
# TODO: select appropriate 183 base build for AppCode
|
||||
versions.appcode=191.1411
|
||||
versions.appcode.repo=ijplatform_master_CIDR_AppCode_Installers
|
||||
versions.clion=183.4284.140
|
||||
versions.clion.repo=ijplatform_IjPlatform183_Cidr_CLion_PublicInstallers
|
||||
versions.jar.guava=25.1-jre
|
||||
versions.jar.groovy-all=2.4.15
|
||||
versions.jar.lombok-ast=0.2.3
|
||||
versions.jar.swingx-core=1.6.2-2
|
||||
versions.jar.kxml2=2.3.0
|
||||
versions.jar.streamex=0.6.7
|
||||
versions.jar.gson=2.8.5
|
||||
versions.jar.oro=2.0.8
|
||||
versions.jar.picocontainer=1.2
|
||||
versions.jar.asm-all=7.0
|
||||
ignore.jar.snappy-in-java=true
|
||||
versions.gradle-api=4.5.1
|
||||
Reference in New Issue
Block a user