42 lines
1023 B
Groovy
42 lines
1023 B
Groovy
apply plugin: 'kotlin'
|
|
|
|
configureJvmProject(project)
|
|
configurePublishing(project)
|
|
|
|
compileJava {
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
options.fork = false
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
maven { url 'http://repository.jetbrains.com/utils' }
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':kotlin-gradle-plugin-api')
|
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
compileOnly "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version"
|
|
|
|
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
|
}
|
|
|
|
def originalSrc = "$kotlin_root/plugins/sam-with-receiver/sam-with-receiver-cli/src"
|
|
def targetSrc = file("$buildDir/sam-with-receiver-target-src")
|
|
|
|
task preprocessSources(type: Copy) {
|
|
from originalSrc
|
|
into targetSrc
|
|
filter { it.replaceAll('(?<!\\.)com\\.intellij', 'org.jetbrains.kotlin.com.intellij') }
|
|
}
|
|
|
|
sourceSets.main.java.srcDirs += targetSrc
|
|
|
|
compileKotlin.dependsOn preprocessSources
|
|
|
|
jar {
|
|
from(targetSrc) { include("META-INF/**") }
|
|
} |