File tree 4 files changed +33
-41
lines changed
buildSrc/src/main/java/org/springframework/pulsar/gradle
4 files changed +33
-41
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,10 @@ public void apply(Project project) {
114
114
115
115
private void configureSpringJavaFormat (Project project ) {
116
116
project .getPlugins ().apply (SpringJavaFormatPlugin .class );
117
- project .getTasks ().withType (Format .class , (Format ) -> Format .setEncoding ("UTF-8" ));
117
+ project .getTasks ().withType (Format .class , (format ) -> {
118
+ format .setEncoding ("UTF-8" );
119
+ project .getTasks ().named ("compileJava" , JavaCompile .class , format ::mustRunAfter );
120
+ });
118
121
project .getPlugins ().apply (CheckstylePlugin .class );
119
122
CheckstyleExtension checkstyle = project .getExtensions ().getByType (CheckstyleExtension .class );
120
123
checkstyle .setToolVersion ("10.12.4" );
Original file line number Diff line number Diff line change
1
+ // file:noinspection GroovyUnusedAssignment
2
+
3
+ tasks. matching { (it. name " extractIncludeTestFixturesProto" ) }
4
+
5
+ tasks. matching { (it. name == " extractIncludeTestFixturesProto" ) }
6
+
7
+ tasks. matching { (it. name == " extractIncludeTestFixturesProto" ) }
8
+
9
+ tasks. named(' extractIncludeProto' ) { enabled = false }
10
+ tasks. named(' extractIncludeTestProto' ) { enabled = false }
11
+ tasks. matching { (it. name == " extractIncludeTestFixturesProto" ) }
12
+ .configureEach { enabled = false }
13
+
14
+ tasks. withType(io.spring.javaformat.gradle.tasks.CheckFormat ). configureEach { task ->
15
+ task. source = project. files(
16
+ task. source. filter { file ->
17
+ ! file. path. contains(' build/generated/source/proto' )
18
+ task. enabled = false
19
+ }
20
+ )
21
+ }
22
+
23
+ protobuf {
24
+ protoc {
25
+ artifact = libs. protobuf. protoc. get()
26
+ }
27
+ }
Original file line number Diff line number Diff line change 1
- import io.spring.javaformat.gradle.tasks.CheckFormat
2
-
3
1
plugins {
4
2
id ' org.springframework.pulsar.spring-module'
5
3
alias(libs. plugins. protobuf)
6
4
}
7
5
8
6
description = ' Spring Pulsar Reactive Support'
9
7
10
- tasks. named(' extractIncludeProto' ) { enabled = false }
11
- tasks. named(' extractIncludeTestProto' ) { enabled = false }
12
-
13
- tasks. withType(CheckFormat ). configureEach { task ->
14
- task. source = project. files(
15
- task. source. filter { file ->
16
- ! file. path. contains(' build/generated/source/proto' )
17
- task. enabled = false
18
- }
19
- )
20
- }
21
-
22
- protobuf {
23
- protoc {
24
- artifact = libs. protobuf. protoc. get()
25
- }
26
- }
8
+ apply from : ' ../gradle/proto-conventions.gradle'
27
9
28
10
dependencies {
29
11
api project (' :spring-pulsar' )
Original file line number Diff line number Diff line change 1
- import io.spring.javaformat.gradle.tasks.CheckFormat
2
-
3
1
plugins {
4
2
id ' org.springframework.pulsar.spring-module'
5
3
id ' java-test-fixtures'
@@ -8,24 +6,7 @@ plugins {
8
6
9
7
description = ' Spring Pulsar Core'
10
8
11
- tasks. named(' extractIncludeProto' ) { enabled = false }
12
- tasks. named(' extractIncludeTestProto' ) { enabled = false }
13
- tasks. named(' extractIncludeTestFixturesProto' ) { enabled = false }
14
-
15
- tasks. withType(CheckFormat ). configureEach { task ->
16
- task. source = project. files(
17
- task. source. filter { file ->
18
- ! file. path. contains(' build/generated/source/proto' )
19
- task. enabled = false
20
- }
21
- )
22
- }
23
-
24
- protobuf {
25
- protoc {
26
- artifact = libs. protobuf. protoc. get()
27
- }
28
- }
9
+ apply from : ' ../gradle/proto-conventions.gradle'
29
10
30
11
dependencies {
31
12
api ' io.micrometer:micrometer-observation'
@@ -78,4 +59,3 @@ dependencies {
78
59
// Used by UserRecordDe/serializer in test fixtures
79
60
testFixturesApi ' com.fasterxml.jackson.core:jackson-databind'
80
61
}
81
-
You can’t perform that action at this time.
0 commit comments