Refactor compiler-related published projects
- move preparation into separate projects - rename projects for publishing - add compiler plugins
This commit is contained in:
@@ -1,38 +1,7 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
description = "Kotlin compiler client embeddable"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
@@ -53,7 +22,6 @@ val jarContents by configurations.creating
|
||||
val testRuntimeCompilerJar by configurations.creating
|
||||
val testStdlibJar by configurations.creating
|
||||
val testScriptRuntimeJar by configurations.creating
|
||||
val default by configurations
|
||||
val archives by configurations
|
||||
|
||||
val projectsToInclude = listOf(
|
||||
@@ -70,18 +38,11 @@ dependencies {
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
testRuntimeCompilerJar(project(":compiler", configuration = "compilerJar"))
|
||||
testRuntimeCompilerJar(project(":kotlin-compiler", configuration = "runtimeJar"))
|
||||
testStdlibJar(project(":kotlin-stdlib", configuration = "mainJar"))
|
||||
testScriptRuntimeJar(project(":kotlin-script-runtime", configuration = "mainJar"))
|
||||
}
|
||||
|
||||
val shadowJar by task<ShadowJar> {
|
||||
setupRuntimeJar("Kotlin compiler client embeddable")
|
||||
baseName = "kotlin-compiler-client-embeddable"
|
||||
from(jarContents)
|
||||
classifier = ""
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectTests("libraries/tools/kotlin-compiler-client-embeddable-test/src", sourcesBaseDir = rootDir)
|
||||
|
||||
@@ -108,18 +69,15 @@ archives.artifacts.let { artifacts ->
|
||||
}
|
||||
}
|
||||
|
||||
artifacts.add(default.name, shadowJar.outputs.files.singleFile) {
|
||||
builtBy(shadowJar)
|
||||
classifier = ""
|
||||
runtimeJar(task<ShadowJar>("shadowJar")) {
|
||||
from(jarContents)
|
||||
}
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
artifacts.add("archives", shadowJar.outputs.files.singleFile) {
|
||||
builtBy(shadowJar)
|
||||
classifier = ""
|
||||
}
|
||||
|
||||
apply<plugins.PublishedKotlinModule>()
|
||||
publish()
|
||||
|
||||
// TODO: remove after finalizing publishing (now due to the problems with sam-with-receiver, the code is not fully navigable in the buildSrc)
|
||||
//tasks {
|
||||
// "uploadArchives"(Upload::class) {
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user