Gradle plugins migration to Gradle build
* Add gradle-tools subproject * Add Gradle buildscripts to the related projects * Remove the projects from the libraries pom.xml * Move AndroidGradleWrapper.groovy to separate source root * Changed artifact dependencies to project dependencies where needed * Extract common configuration into commonConfiguration.gradle * (convert functions to closures to be able to call them) * Refactor DSL usage * Replace `project.properties` with `findProperty` * Unify Gradle wrapper between `libraries` and `gradle-tools` (as a temporary solution, just made the wrapper files the same)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
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/' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-gradle-plugin-api')
|
||||
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
|
||||
compile "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
|
||||
compile "org.jetbrains.kotlin:kotlin-compiler-runner:$kotlin_version"
|
||||
compile "org.jetbrains.kotlin:kotlin-annotation-processing:$kotlin_version"
|
||||
|
||||
compile 'commons-io:commons-io:2.4'
|
||||
compile 'commons-lang:commons-lang:2.4'
|
||||
|
||||
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'
|
||||
|
||||
testCompile "org.jetbrains.kotlin:kotlin-build-common-test:$kotlin_version"
|
||||
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
processResources {
|
||||
expand(project.properties)
|
||||
}
|
||||
|
||||
jar {
|
||||
from compileGroovy.destinationDir
|
||||
}
|
||||
|
||||
test.executable = "${JDK_18}/bin/java"
|
||||
|
||||
dokka {
|
||||
outputFormat = 'markdown'
|
||||
includes = ["${projectDir}/Module.md"]
|
||||
}
|
||||
Reference in New Issue
Block a user