Skip to content

Commit

Permalink
Renamed the delete task
Browse files Browse the repository at this point in the history
  • Loading branch information
KodaiD committed Nov 13, 2024
1 parent 789b3c2 commit 8427a0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions microservice-transaction-sample/rpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ task copyGeneratedProtoToSrc(type: Copy) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

// Task deleteBuildMainJava deletes the generated .java files in build directory
task deleteBuildMainJava(type: Delete) {
// Task deleteGeneratedProto deletes the generated .java files in build directory
task deleteGeneratedProto(type: Delete) {
dependsOn copyGeneratedProtoToSrc
delete fileTree(dir: "$buildDir/generated/source/proto/main/java/sample/rpc")
}
Expand All @@ -47,9 +47,9 @@ processResources {
dependsOn generateProto
}

// Task deleteBuildMainJava needs to depend on deleteBuildMainJava to avoid duplicate class error
// Task deleteGeneratedProto needs to depend on deleteGeneratedProto to avoid duplicate class error
tasks.named("compileJava").configure {
dependsOn deleteBuildMainJava
dependsOn deleteGeneratedProto
}

java {
Expand Down
8 changes: 4 additions & 4 deletions spring-data-microservice-transaction-sample/rpc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ task copyGeneratedProtoToSrc(type: Copy) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

// Task deleteBuildMainJava deletes the generated .java files in build directory
task deleteBuildMainJava(type: Delete) {
// Task deleteGeneratedProto deletes the generated .java files in build directory
task deleteGeneratedProto(type: Delete) {
dependsOn copyGeneratedProtoToSrc
delete fileTree(dir: "$buildDir/generated/source/proto/main/java/sample/rpc")
}
Expand All @@ -47,9 +47,9 @@ processResources {
dependsOn generateProto
}

// Task deleteBuildMainJava needs to depend on deleteBuildMainJava to avoid duplicate class error
// Task deleteGeneratedProto needs to depend on deleteGeneratedProto to avoid duplicate class error
tasks.named("compileJava").configure {
dependsOn deleteBuildMainJava
dependsOn deleteGeneratedProto
}

java {
Expand Down

0 comments on commit 8427a0d

Please sign in to comment.