mirror of
https://gitee.com/BDWare/common
synced 2026-02-14 16:49:28 +00:00
build: config spotless plugin
This commit is contained in:
20
build.gradle
20
build.gradle
@@ -1,3 +1,9 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath "com.diffplug.spotless:spotless-plugin-gradle:4.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'java-library'
|
||||
@@ -6,6 +12,19 @@ plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '4.0.2'
|
||||
}
|
||||
|
||||
apply plugin: "com.diffplug.gradle.spotless"
|
||||
|
||||
spotless {
|
||||
java {
|
||||
removeUnusedImports()
|
||||
eclipse().configFile('shardingsphere_eclipse_formatter.xml')
|
||||
target fileTree('.') {
|
||||
include '**/*.java'
|
||||
}
|
||||
}
|
||||
}
|
||||
//tasks.compileJava.dependsOn(spotlessJavaApply)
|
||||
|
||||
shadowJar {
|
||||
classifier = "jar"
|
||||
dependencies {
|
||||
@@ -14,6 +33,7 @@ shadowJar {
|
||||
// relocate 'com.google.code.gson', 'irs.com.google.code.gson'
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
|
||||
Reference in New Issue
Block a user