113 lines
3.1 KiB
Groovy
113 lines
3.1 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'org.jetbrains.dokka'
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.13'
|
|
}
|
|
}
|
|
|
|
configureJvmProject(project)
|
|
configurePublishing(project)
|
|
|
|
repositories {
|
|
jcenter()
|
|
mavenLocal()
|
|
maven { url 'http://repository.jetbrains.com/utils/' }
|
|
maven { url 'https://maven.google.com' }
|
|
}
|
|
|
|
configurations {
|
|
agp25CompileOnly
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':kotlin-gradle-plugin-api')
|
|
|
|
compile project(':kotlin-stdlib')
|
|
compile project(':android-extensions-compiler')
|
|
// compile project(path: ':compiler', configuration: 'embeddableCompilerJar')
|
|
compile project(':kotlin-build-common')
|
|
compile project(':compiler:compiler-runner')
|
|
compile project(":compiler:incremental-compilation-impl")
|
|
compile project(":compiler:daemon")
|
|
compile project(':kotlin-annotation-processing')
|
|
|
|
compileOnly 'com.android.tools.build:gradle:2.0.0'
|
|
compileOnly 'org.codehaus.groovy:groovy-all:2.3.9'
|
|
compileOnly 'org.jetbrains.kotlin:gradle-api:2.2'
|
|
|
|
agp25CompileOnly 'com.android.tools.build:gradle:3.0.0-alpha1'
|
|
agp25CompileOnly 'org.codehaus.groovy:groovy-all:2.3.9'
|
|
agp25CompileOnly gradleApi()
|
|
|
|
testCompile project (path: ':kotlin-build-common', configuration: 'tests-jar')
|
|
testCompile project(':kotlin-test::kotlin-test-junit')
|
|
testCompile "junit:junit:4.12"
|
|
}
|
|
|
|
tasks.withType(project.compileKotlin.class) {
|
|
kotlinOptions.jdkHome = JDK_18
|
|
}
|
|
|
|
compileKotlin.dependsOn compileGroovy
|
|
compileGroovy.dependsOn.remove("compileJava")
|
|
|
|
def groovyClassesDir = file("${buildDir}/mainGroovyClasses")
|
|
compileGroovy.destinationDir = groovyClassesDir
|
|
sourceSets.main.compileClasspath += files(groovyClassesDir)
|
|
compileGroovy.classpath = sourceSets.main.compileClasspath - files(groovyClassesDir)
|
|
sourceSets.main.java.srcDirs += sourceSets.main.kotlin.srcDirs
|
|
|
|
sourceSets {
|
|
agp25 {
|
|
compileClasspath += configurations.compile + configurations.agp25CompileOnly + sourceSets.main.output
|
|
compileClasspath += files(groovyClassesDir)
|
|
}
|
|
}
|
|
|
|
compileAgp25Kotlin.dependsOn compileGroovy
|
|
|
|
processResources {
|
|
expand(project.properties)
|
|
}
|
|
|
|
jar.dependsOn agp25Classes
|
|
|
|
jar {
|
|
from compileGroovy.destinationDir
|
|
from sourceSets.agp25.output.classesDir
|
|
}
|
|
|
|
test.executable = "${JDK_18}/bin/java"
|
|
|
|
dokka {
|
|
outputFormat = 'markdown'
|
|
includes = ["${projectDir}/Module.md"]
|
|
}
|
|
|
|
pluginBundle {
|
|
plugins {
|
|
kotlinJvmPlugin {
|
|
id = 'org.jetbrains.kotlin.jvm'
|
|
description = displayName = 'Kotlin JVM plugin'
|
|
}
|
|
kotlinAndroidPlugin {
|
|
id = 'org.jetbrains.kotlin.android'
|
|
description = displayName = 'Kotlin Android plugin'
|
|
}
|
|
kotlinAndroidExtensionsPlugin {
|
|
id = 'org.jetbrains.kotlin.android.extensions'
|
|
description = displayName = 'Kotlin Android Extensions plugin'
|
|
}
|
|
kotlinKaptPlugin {
|
|
id = 'org.jetbrains.kotlin.kapt'
|
|
description = displayName = 'Kotlin Kapt plugin'
|
|
}
|
|
}
|
|
} |