Pill: Introduce pill{} extension to set extended Pill configuration

Also introduce the flavor concept which allows to specify what part of Kotlin project should be imported.
This commit is contained in:
Yan Zhulanow
2018-04-20 18:45:23 +03:00
parent a57869993d
commit ba5836d666
19 changed files with 133 additions and 56 deletions
+4 -1
View File
@@ -1,12 +1,15 @@
description = 'Kotlin Test JUnit'
apply plugin: 'kotlin-platform-jvm'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
project.ext["jpsLibraryPath"] = rootProject.distLibDir
pill {
importAsLibrary = true
}
dependencies {
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
+4 -1
View File
@@ -1,12 +1,15 @@
description = 'Kotlin Test'
apply plugin: 'kotlin-platform-jvm'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
project.ext["jpsLibraryPath"] = rootProject.distLibDir
pill {
importAsLibrary = true
}
sourceSets {
java9
+8 -2
View File
@@ -3,6 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.metadata.jvm.JvmModuleProtoBuf
import org.jetbrains.kotlin.pill.PillExtension
import proguard.gradle.ProGuardTask
import shadow.org.apache.tools.zip.ZipEntry
import shadow.org.apache.tools.zip.ZipOutputStream
@@ -12,12 +13,17 @@ import java.io.DataOutputStream
description = "Kotlin Full Reflection Library"
plugins { java }
plugins {
java
id("pill-configurable")
}
callGroovy("configureJavaOnlyJvm6Project", this)
publish()
val jpsLibraryPath by extra(rootProject.extra["distLibDir"])
pill {
importAsLibrary = true
}
val core = "$rootDir/core"
val annotationsSrc = "$buildDir/annotations"
+4 -1
View File
@@ -1,6 +1,7 @@
description = 'Kotlin Standard Library for JVM'
apply plugin: 'kotlin-platform-jvm'
apply plugin: 'pill-configurable'
archivesBaseName = 'kotlin-stdlib'
@@ -8,7 +9,9 @@ configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
project.ext["jpsLibraryPath"] = rootProject.distLibDir
pill {
importAsLibrary = true
}
sourceSets {
annotations {
@@ -1,5 +1,6 @@
apply plugin: 'kotlin'
apply plugin: 'maven'
apply plugin: 'jps-compatible'
configureJvmProject(project)
configurePublishing(project)
@@ -8,6 +9,10 @@ repositories {
mavenLocal()
}
pill {
variant = "FULL"
}
dependencies {
compile project(':kotlin-stdlib')
@@ -3,6 +3,7 @@ apply plugin: 'java-gradle-plugin'
apply plugin: 'kotlin'
apply plugin: 'groovy'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'jps-compatible'
buildscript {
repositories {
@@ -26,6 +27,10 @@ configurations {
agp25CompileOnly
}
pill {
variant = "FULL"
}
dependencies {
compile project(':kotlin-gradle-plugin-api')
compileOnly project(':compiler')
+4 -1
View File
@@ -1,12 +1,15 @@
description 'Kotlin Script Runtime'
apply plugin: 'kotlin'
apply plugin: 'pill-configurable'
configureJvm6Project(project)
configureDist(project)
configurePublishing(project)
project.ext["jpsLibraryPath"] = rootProject.distLibDir
pill {
importAsLibrary = true
}
dependencies {
compileOnly project(path: ':kotlin-stdlib', configuration: 'distJar')