vscode-gradle/gradle-plugin/build.gradle

47 строки
781 B
Groovy

plugins {
id 'java-gradle-plugin'
}
configurations {
bundled
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
implementation project(":gradle-plugin-api")
bundled(project(":gradle-plugin-api")) {
transitive = false
}
}
jar {
from {
configurations.bundled.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
task copyJar(type: Copy) {
from "build/libs/gradle-plugin.jar"
into "../gradle-server/src/main/resources"
}
spotless {
java {
importOrder()
eclipse()
removeUnusedImports()
trimTrailingWhitespace()
targetExclude "build/**"
}
}
tasks.build.dependsOn tasks.copyJar
tasks.copyJar.dependsOn tasks.jar
compileJava.dependsOn 'spotlessCheck'