Skip to content

Commit

Permalink
refactor googleJavaFormat (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull authored Aug 28, 2024
1 parent 1974bb3 commit 661d8ca
Show file tree
Hide file tree
Showing 43 changed files with 69 additions and 296 deletions.
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ allprojects {
group = 'com.webank.wedpr'
version = '1.0.0-rc1-SNAPSHOT'
apply plugin: 'maven-publish'
apply plugin: 'com.github.sherter.google-java-format'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
Expand Down Expand Up @@ -174,6 +175,13 @@ subprojects {
resources.srcDir file('src/integration-test/resources')
}
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
Expand Down
7 changes: 0 additions & 7 deletions wedpr-adm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,3 @@ dependencies {
compile project(":wedpr-components-security")
compile project(":wedpr-components-report")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
7 changes: 0 additions & 7 deletions wedpr-admin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ dependencies {
compile project(":wedpr-components-security")
compile project(":wedpr-components-admin")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
10 changes: 1 addition & 9 deletions wedpr-components/admin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile project(":wedpr-components-token-auth")
compile project(":wedpr-components-mybatis")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
}
8 changes: 0 additions & 8 deletions wedpr-components/authorization/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
compile project(":wedpr-components-uuid")
compile project(":wedpr-components-sync")
compile project(":wedpr-components-resource-follower")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/blockchain/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile project(":wedpr-core-utils")
compile ("org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:${bcosSDKVersion}")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
13 changes: 1 addition & 12 deletions wedpr-components/dataset/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

// Additional attribute definition
Expand Down Expand Up @@ -38,14 +37,4 @@ dependencies {
// shen tong
compile files('libs/oscarJDBC8.jar')
// compile files('libs/oscarHibernate54.jar')
}

googleJavaFormat {
toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
// exclude '**/*Test.java'
// exclude '**/Test*.java'
// exclude '**/Mock*.java'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ public void deleteDatasetList(UserInfo userInfo, List<String> datasetIdList)

// sort and distinct
List<String> newDatasetIdList =
datasetIdList.stream()
datasetIdList
.stream()
.distinct()
.sorted(String::compareTo)
.collect(Collectors.toList());
Expand Down
8 changes: 0 additions & 8 deletions wedpr-components/env-integration/jupyter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
compile project(":wedpr-components-uuid")
compile project(":wedpr-components-sys-config")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/http-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile ("org.apache.httpcomponents:httpclient:${httpClientVersion}")
compile project(":wedpr-core-utils")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/initializer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
Expand All @@ -10,10 +9,3 @@ dependencies {
compile project(":wedpr-components-mybatis")
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/leader-election/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile project(":wedpr-components-sys-config")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/meta/agency/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
compile project(":wedpr-components-uuid")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/meta/project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
Expand All @@ -10,10 +9,3 @@ dependencies{
compile project(":wedpr-components-resource-follower")
compile project(":wedpr-components-dataset")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
10 changes: 1 addition & 9 deletions wedpr-components/meta/resource-follower/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-uuid")
compile project(":wedpr-components-mybatis")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
}
10 changes: 1 addition & 9 deletions wedpr-components/meta/setting-template/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
compile project(":wedpr-core-protocol")
compile project(":wedpr-components-uuid")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
}
8 changes: 0 additions & 8 deletions wedpr-components/meta/sys-config/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-components-mybatis")
compile project(":wedpr-core-protocol")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/mybatis/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
Expand All @@ -13,10 +12,3 @@ dependencies {
compile("com.baomidou:mybatis-plus-generator:${mybatisPlusGeneratorVersion}")
compile("org.apache.velocity:velocity-engine-core:${velocityVersion}")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
8 changes: 0 additions & 8 deletions wedpr-components/report/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile project(":wedpr-components-mybatis")
implementation("org.springframework.boot:spring-boot-starter-quartz:${springBootVersion}")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
10 changes: 1 addition & 9 deletions wedpr-components/scheduler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
Expand All @@ -11,11 +10,4 @@ dependencies {
compile project(":wedpr-components-project")
compile project(":wedpr-components-sync")
compile project(":wedpr-components-http-client")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
}
10 changes: 1 addition & 9 deletions wedpr-components/security/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}

dependencies {
compile project(":wedpr-components-token-auth")
compile project(":wedpr-components-user")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
}
8 changes: 0 additions & 8 deletions wedpr-components/spi/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
// Apply the java-library plugin to add support for Java Library
plugins {
id 'java'
id 'com.github.sherter.google-java-format'
}
dependencies{
compile project(":wedpr-core-utils")
}
googleJavaFormat {
//toolVersion = '1.7'
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
//source = *.allJava
}
Loading

0 comments on commit 661d8ca

Please sign in to comment.