[kotlin compiler][update] 1.2.40-dev-610
Switch to pinned teamcity builds.
This commit is contained in:
committed by
Vasily Levchenko
parent
9e8d784dac
commit
1a0f9bfe2e
Vendored
-83
@@ -37,89 +37,6 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
def kotlinGradleModule = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion"
|
||||
def kotlinStdLibJdk8Module = "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinStdLibJdk8Version"
|
||||
|
||||
def modules = ['compiler' : kotlinCompilerModule,
|
||||
'gradle_plugin' : kotlinGradleModule,
|
||||
'stdlib_jdk8' : kotlinStdLibJdk8Module,
|
||||
'stdlib' : kotlinStdLibModule,
|
||||
'reflect' : kotlinReflectModule,
|
||||
'script_runtime': kotlinScriptRuntimeModule
|
||||
]
|
||||
|
||||
Map.metaClass.moduleEntry = { key, version ->
|
||||
delegate[key] = "org.jetbrains.kotlin:kotlin-${key.replace('_', '-')}:$version"
|
||||
}
|
||||
|
||||
modules.moduleEntry('gradle_plugin_api', kotlinGradlePluginApiVersion)
|
||||
modules.moduleEntry('compiler_embeddable', kotlinCompilerEmbeddableVersion)
|
||||
modules.moduleEntry('annotation_processing_gradle', kotlinAnnotationProcessingGradleVersion)
|
||||
modules.moduleEntry('android_extensions', kotlinAndroidExtensionsVersion)
|
||||
modules.moduleEntry('compiler_runner', kotlinCompilerRunnerVersion)
|
||||
modules.moduleEntry('stdlib_jre7', kotlinStdLibJdk7Version)
|
||||
modules.moduleEntry('build_common', kotlinBuildCommonVersion)
|
||||
modules.moduleEntry('daemon_client', kotlinDaemonClientVersion)
|
||||
|
||||
private static String configurationJar(x) {
|
||||
"kotlin_${x}_jar".toString()
|
||||
}
|
||||
|
||||
private static String configurationPom(x) {
|
||||
"kotlin_${x}_pom".toString()
|
||||
}
|
||||
|
||||
private static String configurationSrc(x) {
|
||||
"kotlin_${x}_src".toString()
|
||||
}
|
||||
|
||||
private static String configurationDoc(x) {
|
||||
"kotlin_${x}_doc".toString()
|
||||
}
|
||||
|
||||
modules.forEach{ x, _ ->
|
||||
configurations.create(configurationJar(x))
|
||||
configurations.create(configurationPom(x))
|
||||
configurations.create(configurationSrc(x))
|
||||
configurations.create(configurationDoc(x))
|
||||
}
|
||||
|
||||
modules.forEach { k, v ->
|
||||
dependencies.add(configurationJar(k), "${v}@jar")
|
||||
dependencies.add(configurationPom(k), "${v}@pom")
|
||||
dependencies.add(configurationSrc(k), "${v}:sources@jar")
|
||||
dependencies.add(configurationDoc(k), "${v}:javadoc@jar")
|
||||
}
|
||||
|
||||
// TODO: Check if we really need the our bintray mirror and delete the uploading code below if we don't.
|
||||
repositories {
|
||||
maven { url kotlinCompilerRepo }
|
||||
}
|
||||
|
||||
def uploads = modules.keySet()
|
||||
uploads.each { target ->
|
||||
task("${target}Upload", type:GradleBuild) {
|
||||
tasks = ['bintrayUpload']
|
||||
buildFile project.file("upload.gradle")
|
||||
dir project.projectDir
|
||||
startParameter.projectProperties = [
|
||||
'user' : "${project.hasProperty('bintrayUser') ? project['bintrayUser'] : System.getenv('BINTRAY_USER')}",
|
||||
'key' : "${ project.hasProperty('bintrayKey') ? project.property('bintrayKey') : System.getenv('BINTRAY_KEY')}",
|
||||
'module' : modules["${target}"],
|
||||
'jar' : project.configurations.getByName(configurationJar(target)).files.collect {it.path},
|
||||
'src' : project.configurations.getByName(configurationSrc(target)).files.collect {it.path},
|
||||
'doc' : project.configurations.getByName(configurationDoc(target)).files.collect {it.path},
|
||||
'pom' : project.configurations.getByName(configurationPom(target)).files.collect {it.path},
|
||||
'override': project.hasProperty("override") && project["override"]
|
||||
]
|
||||
startParameter.useEmptySettings()
|
||||
}
|
||||
}
|
||||
|
||||
task update_kotlin_compiler(type: DefaultTask) {
|
||||
dependsOn uploads.collect{"${it}Upload"}
|
||||
}
|
||||
|
||||
abstract class NativeDep extends DefaultTask {
|
||||
static final String baseUrl = "https://download.jetbrains.com/kotlin/native"
|
||||
|
||||
|
||||
Vendored
-80
@@ -1,80 +0,0 @@
|
||||
buildscript {
|
||||
def rootProperties = new Properties()
|
||||
rootProperties.load(new FileReader(project.file("../gradle.properties")))
|
||||
rootProperties.each {k,v -> ext.set(k, v)}
|
||||
apply from: "../gradle/kotlinGradlePlugin.gradle"
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
def versionMapping = [
|
||||
'kotlin-script-runtime' : kotlinScriptRuntimeVersion,
|
||||
'kotlin-compiler' : kotlinCompilerVersion,
|
||||
'kotlin-stdlib' : kotlinStdLibVersion,
|
||||
'kotlin-reflect' : kotlinReflectVersion,
|
||||
'kotlin-stdlib-jre8' : kotlinStdLibJdk8Version
|
||||
]
|
||||
|
||||
// Hack kotlin-compiler pom-file to resolve the dependency correctly.
|
||||
task generatePom(type: DefaultTask) {
|
||||
def originalPom = project.files(gradle.startParameter.projectProperties.pom).first()
|
||||
inputs.file(originalPom)
|
||||
|
||||
def (_, artifactIdString, versionString) = gradle.startParameter.projectProperties.module.tokenize(':')
|
||||
def versionPath = versionString
|
||||
|
||||
def newPom = file("${temporaryDir.canonicalPath}/$artifactIdString-${versionString}.pom")
|
||||
outputs.file(newPom)
|
||||
|
||||
doLast {
|
||||
def xml = new XmlParser().parse(originalPom)
|
||||
def parent = xml.children().find() { it.name().localPart == 'parent' }
|
||||
if (parent != null) {
|
||||
def groupId = parent.groupId
|
||||
def version = parent.version
|
||||
xml.append(groupId)
|
||||
xml.append(version)
|
||||
xml.remove(parent)
|
||||
}
|
||||
xml.dependencies[0].each {
|
||||
def suggestedVersion = versionMapping[it.artifactId.text()]
|
||||
if (suggestedVersion != null) {
|
||||
it.version[0].setValue(suggestedVersion)
|
||||
}
|
||||
}
|
||||
new XmlNodePrinter(new PrintWriter(new FileWriter(newPom))).print(xml)
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = gradle.startParameter.projectProperties.user
|
||||
key = gradle.startParameter.projectProperties.key
|
||||
pkg {
|
||||
repo = 'kotlin-native-dependencies'
|
||||
name = 'kotlin-compiler-builds'
|
||||
userOrg = 'jetbrains'
|
||||
publish = true
|
||||
override = gradle.startParameter.projectProperties.override
|
||||
}
|
||||
|
||||
filesSpec {
|
||||
def (groupId, artifactId, version) = gradle.startParameter.projectProperties.module.tokenize(':')
|
||||
def groupPath = groupId.replace('.', '/')
|
||||
def artifactPath = artifactId
|
||||
def versionPath = version
|
||||
from project.files(gradle.startParameter.projectProperties.jar)
|
||||
from project.files(gradle.startParameter.projectProperties.src)
|
||||
from project.files(gradle.startParameter.projectProperties.doc)
|
||||
from generatePom.outputs.files
|
||||
into "$groupPath/$artifactPath/$versionPath"
|
||||
}
|
||||
|
||||
}
|
||||
+1
-12
@@ -20,9 +20,7 @@ remoteRoot=konan_tests
|
||||
#kotlinCompilerModule=org.jetbrains.kotlin:kotlin-compiler:1.1-SNAPSHOT
|
||||
# Download artifacts of https://teamcity.jetbrains.com/viewType.html?buildTypeId=Kotlin_120_Compiler
|
||||
testDataVersion=1226829:id
|
||||
kotlinCompilerRepo=https://dl.bintray.com/jetbrains/kotlin-native-dependencies
|
||||
#kotlinCompilerRepo=http://oss.sonatype.org/content/repositories/snapshots
|
||||
#kotlinCompilerRepo=http://dl.bintray.com/kotlin/kotlin-dev
|
||||
kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_CompilerAllPlugins),number:1.2.40-dev-610/artifacts/content/maven
|
||||
kotlinCompilerVersion=1.2.40-dev-610
|
||||
kotlinScriptRuntimeVersion=1.2.40-dev-610
|
||||
kotlinStdLibVersion=1.2.40-dev-610
|
||||
@@ -33,14 +31,5 @@ org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||
##
|
||||
# required for performance mesuarement tasks
|
||||
|
||||
kotlinStdLibJdk7Version=1.2.40-dev-610
|
||||
kotlinStdLibJdk8Version=1.2.40-dev-610
|
||||
kotlinGradlePluginVersion=1.2.40-dev-610
|
||||
|
||||
kotlinGradlePluginApiVersion=1.2.40-dev-610
|
||||
kotlinCompilerEmbeddableVersion=1.2.40-dev-610
|
||||
kotlinAnnotationProcessingGradleVersion=1.2.40-dev-610
|
||||
kotlinAndroidExtensionsVersion=1.2.40-dev-610
|
||||
kotlinCompilerRunnerVersion=1.2.40-dev-610
|
||||
kotlinBuildCommonVersion=1.2.40-dev-610
|
||||
kotlinDaemonClientVersion=1.2.40-dev-610
|
||||
|
||||
@@ -43,7 +43,7 @@ compileKotlin {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlinStdLibJdk8Version"
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinStdLibJdk8Version"
|
||||
}
|
||||
|
||||
task jvmRun(type: JavaExec) {
|
||||
|
||||
Reference in New Issue
Block a user