Provide shortcuts for producing quick compiler for maven and rebuilding stdlib-js from ant.
This commit is contained in:
@@ -507,10 +507,12 @@
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
<target name="compiler-for-maven">
|
<target name="pack-compiler-for-maven">
|
||||||
<pack-compiler-for-maven/>
|
<pack-compiler-for-maven/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="compiler-quick-for-maven" depends="compiler-quick,pack-compiler-for-maven"/>
|
||||||
|
|
||||||
<target name="kotlin-build-common-test">
|
<target name="kotlin-build-common-test">
|
||||||
<cleandir dir="${output}/classes/kotlin-build-common-test"/>
|
<cleandir dir="${output}/classes/kotlin-build-common-test"/>
|
||||||
|
|
||||||
@@ -880,34 +882,46 @@
|
|||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
<target name="gradle-runtime">
|
<macrodef name="run-gradle-build">
|
||||||
<local name="deployVersion" />
|
<attribute name="tasks" />
|
||||||
<condition property="deployVersion" value="" else="-PdeployVersion=${build.number}">
|
<sequential>
|
||||||
<equals arg1="${build.number}" arg2="snapshot" />
|
<local name="deployVersion" />
|
||||||
</condition>
|
<condition property="deployVersion" value="" else="-PdeployVersion=${build.number}">
|
||||||
|
<equals arg1="${build.number}" arg2="snapshot" />
|
||||||
|
</condition>
|
||||||
|
|
||||||
<java classname="org.gradle.wrapper.GradleWrapperMain"
|
<java classname="org.gradle.wrapper.GradleWrapperMain"
|
||||||
fork="true"
|
fork="true"
|
||||||
dir="${basedir}/libraries"
|
dir="${basedir}/libraries"
|
||||||
failonerror="true"
|
failonerror="true"
|
||||||
timeout="4000000"
|
timeout="4000000"
|
||||||
maxmemory="400m"
|
maxmemory="400m"
|
||||||
taskname="gradle-runtime">
|
taskname="gradle">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${basedir}/libraries/gradle/wrapper/gradle-wrapper.jar"/>
|
<pathelement location="${basedir}/libraries/gradle/wrapper/gradle-wrapper.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<arg line="clean" />
|
<arg line="@{tasks}" />
|
||||||
<arg line="dist" />
|
<arg line="--no-daemon -Dkotlin.daemon.jvm.options=-Xmx700m -Dkotlin.daemon.verbose=true" />
|
||||||
<arg line="publish" />
|
<arg line="${deployVersion}" />
|
||||||
<arg line="--no-daemon -Dkotlin.daemon.jvm.options=-Xmx700m -Dkotlin.daemon.verbose=true" />
|
<arg line="${gradle.logging.level}" />
|
||||||
<arg line="${deployVersion}" />
|
</java>
|
||||||
<arg line="${gradle.logging.level}" />
|
</sequential>
|
||||||
</java>
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="gradle-runtime">
|
||||||
|
<run-gradle-build tasks="clean dist publish" />
|
||||||
|
|
||||||
<!-- legacy artifact, required for migration on teamcity -->
|
<!-- legacy artifact, required for migration on teamcity -->
|
||||||
<jar destfile="${output}/kotlin-reflect-sources-for-maven.jar" />
|
<jar destfile="${output}/kotlin-reflect-sources-for-maven.jar" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="stdlib-js">
|
||||||
|
<run-gradle-build tasks=":kotlin-stdlib-js:dist :kotlin-test:kotlin-test-js:dist --rerun-tasks" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="compiler-quick-and-stdlib-js"
|
||||||
|
depends="compiler-quick-for-maven,stdlib-js"/>
|
||||||
|
|
||||||
<target name="runtime"
|
<target name="runtime"
|
||||||
depends="gradle-runtime,mock-runtime-for-test"/>
|
depends="gradle-runtime,mock-runtime-for-test"/>
|
||||||
|
|
||||||
@@ -923,7 +937,7 @@
|
|||||||
description="Builds redistributables from sources"/>
|
description="Builds redistributables from sources"/>
|
||||||
|
|
||||||
<target name="dist-quick"
|
<target name="dist-quick"
|
||||||
depends="clean,init,prepare-dist,preloader,serialize-builtins,compiler-quick,ant-tools,runtime,other-artifacts"
|
depends="clean,init,prepare-dist,preloader,serialize-builtins,compiler-quick-for-maven,ant-tools,runtime,other-artifacts"
|
||||||
description="Builds everything, but classes are reused from project out dir, doesn't run proguard"/>
|
description="Builds everything, but classes are reused from project out dir, doesn't run proguard"/>
|
||||||
|
|
||||||
<target name="dist-quick-compiler-only"
|
<target name="dist-quick-compiler-only"
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ buildscript {
|
|||||||
ext.JDK_16 = System.getenv("JDK_16")
|
ext.JDK_16 = System.getenv("JDK_16")
|
||||||
ext.JDK_17 = System.getenv("JDK_17")
|
ext.JDK_17 = System.getenv("JDK_17")
|
||||||
ext.JDK_18 = System.getenv("JDK_18")
|
ext.JDK_18 = System.getenv("JDK_18")
|
||||||
ext.distDir = project.file("${rootDir}/../dist/kotlinc/lib")
|
ext.distDir = project.file("${rootDir}/../dist")
|
||||||
ext.bootstrapCompilerFile = project.file("${rootDir}/../dist/kotlin-compiler-for-maven.jar")
|
ext.distLibDir = project.file("${rootDir}/../dist/kotlinc/lib")
|
||||||
|
ext.bootstrapCompilerFile = project.file("$distDir/kotlin-compiler-for-maven.jar")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = 'org.jetbrains.kotlin'
|
group = 'org.jetbrains.kotlin'
|
||||||
@@ -141,8 +142,7 @@ static def configurePublishing(Project project) {
|
|||||||
|
|
||||||
task dist(type: Copy, dependsOn: assemble) {
|
task dist(type: Copy, dependsOn: assemble) {
|
||||||
rename "-${java.util.regex.Pattern.quote(version)}", ''
|
rename "-${java.util.regex.Pattern.quote(version)}", ''
|
||||||
// rename { String fileName -> 'gradle-' + fileName }
|
into distLibDir
|
||||||
into distDir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadArchives {
|
uploadArchives {
|
||||||
|
|||||||
@@ -42,9 +42,12 @@ artifacts {
|
|||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task distJs(type: Copy) {
|
||||||
|
from(compileKotlin2Js.kotlinOptions.outputFile)
|
||||||
|
into "$distDir/js"
|
||||||
|
}
|
||||||
|
|
||||||
dist {
|
dist {
|
||||||
|
dependsOn distJs
|
||||||
from (jar, sourcesJar)
|
from (jar, sourcesJar)
|
||||||
from(compileKotlin2Js.kotlinOptions.outputFile) {
|
|
||||||
into '../../js'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -227,8 +227,13 @@ artifacts {
|
|||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task distJs(type: Copy) {
|
||||||
|
from(compileJs)
|
||||||
|
into "$distDir/js"
|
||||||
|
}
|
||||||
|
|
||||||
dist {
|
dist {
|
||||||
|
dependsOn distJs
|
||||||
[mergedJar, sourcesJar].forEach {
|
[mergedJar, sourcesJar].forEach {
|
||||||
from(it)
|
from(it)
|
||||||
// legacy
|
// legacy
|
||||||
@@ -236,9 +241,6 @@ dist {
|
|||||||
rename("kotlin-stdlib-js", 'kotlin-jslib')
|
rename("kotlin-stdlib-js", 'kotlin-jslib')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
from(compileJs) {
|
|
||||||
into '../../js'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user