@@ -17,88 +17,89 @@ buildscript {
17
17
}
18
18
19
19
plugins {
20
- id ' java-gradle-plugin'
21
- id ' java-test-fixtures'
22
- id ' eclipse'
20
+ id ' java-gradle-plugin'
21
+ id ' java-test-fixtures'
22
+ id ' eclipse'
23
23
}
24
24
25
25
group = " org.elasticsearch"
26
26
27
27
// This project contains Checkstyle rule implementations used by IDEs which use a Java 11 runtime
28
28
java {
29
- targetCompatibility = 11
30
- sourceCompatibility = 11
29
+ targetCompatibility = 17
30
+ sourceCompatibility = 17
31
31
}
32
32
33
33
gradlePlugin {
34
- // We already configure publication and we don't need or want the one that comes
35
- // with the java-gradle-plugin
36
- automatedPublishing = false
37
- plugins {
38
- internalLicenseheaders {
39
- id = ' elasticsearch.internal-licenseheaders'
40
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersPrecommitPlugin'
41
- }
42
- eclipse {
43
- id = ' elasticsearch.eclipse'
44
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.EclipseConventionPlugin'
45
- }
46
- publish {
47
- id = ' elasticsearch.publish'
48
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.PublishPlugin'
49
- }
50
- licensing {
51
- id = ' elasticsearch.licensing'
52
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.LicensingPlugin'
53
- }
54
- buildTools {
55
- id = ' elasticsearch.build-tools'
56
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.BuildToolsConventionsPlugin'
57
- }
58
- versions {
59
- id = ' elasticsearch.versions'
60
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.VersionPropertiesPlugin'
61
- }
62
- formatting {
63
- id = ' elasticsearch.formatting'
64
- implementationClass = ' org.elasticsearch.gradle.internal.conventions.precommit.FormattingPrecommitPlugin'
65
- }
34
+ // We already configure publication and we don't need or want the one that comes
35
+ // with the java-gradle-plugin
36
+ automatedPublishing = false
37
+ plugins {
38
+ internalLicenseheaders {
39
+ id = ' elasticsearch.internal-licenseheaders'
40
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersPrecommitPlugin'
66
41
}
42
+ eclipse {
43
+ id = ' elasticsearch.eclipse'
44
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.EclipseConventionPlugin'
45
+ }
46
+ publish {
47
+ id = ' elasticsearch.publish'
48
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.PublishPlugin'
49
+ }
50
+ licensing {
51
+ id = ' elasticsearch.licensing'
52
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.LicensingPlugin'
53
+ }
54
+ buildTools {
55
+ id = ' elasticsearch.build-tools'
56
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.BuildToolsConventionsPlugin'
57
+ }
58
+ versions {
59
+ id = ' elasticsearch.versions'
60
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.VersionPropertiesPlugin'
61
+ }
62
+ formatting {
63
+ id = ' elasticsearch.formatting'
64
+ implementationClass = ' org.elasticsearch.gradle.internal.conventions.precommit.FormattingPrecommitPlugin'
65
+ }
66
+ }
67
67
}
68
68
69
69
repositories {
70
- mavenCentral()
71
- gradlePluginPortal()
70
+ mavenCentral()
71
+ gradlePluginPortal()
72
72
}
73
73
74
74
dependencies {
75
- api buildLibs. maven. model
76
- api buildLibs. shadow. plugin
77
- api buildLibs. apache. rat
78
- compileOnly buildLibs. checkstyle
79
- constraints {
80
- api(" org.eclipse.platform:org.eclipse.osgi:3.18.300" ) {
81
- because(" Use the same version as we do in spotless gradle plugin at runtime" )
82
- }
83
- }
84
- api(buildLibs. spotless. plugin) {
85
- exclude module : " groovy-xml"
75
+ api buildLibs. maven. model
76
+ api buildLibs. shadow. plugin
77
+ api buildLibs. apache. rat
78
+ api buildLibs. nmcp
79
+ compileOnly buildLibs. checkstyle
80
+ constraints {
81
+ api(" org.eclipse.platform:org.eclipse.osgi:3.18.300" ) {
82
+ because(" Use the same version as we do in spotless gradle plugin at runtime" )
86
83
}
84
+ }
85
+ api(buildLibs. spotless. plugin) {
86
+ exclude module : " groovy-xml"
87
+ }
87
88
}
88
89
89
90
project. getPlugins(). withType(JavaBasePlugin . class) {
90
- java. getModularity(). getInferModulePath(). set(false );
91
- eclipse. getClasspath(). getFile(). whenMerged { classpath ->
92
- /*
93
- * give each source folder a unique corresponding output folder
94
- * outside of the usual `build` folder. We can't put the build
95
- * in the usual build folder because eclipse becomes *very* sad
96
- * if we delete it. Which `gradlew clean` does all the time.
97
- */
98
- classpath. getEntries(). findAll{ s -> s instanceof SourceFolder }. eachWithIndex { s , i ->
99
- s. setOutput(" out/eclipse" + i)
100
- }
91
+ java. getModularity(). getInferModulePath(). set(false );
92
+ eclipse. getClasspath(). getFile(). whenMerged { classpath ->
93
+ /*
94
+ * give each source folder a unique corresponding output folder
95
+ * outside of the usual `build` folder. We can't put the build
96
+ * in the usual build folder because eclipse becomes *very* sad
97
+ * if we delete it. Which `gradlew clean` does all the time.
98
+ */
99
+ classpath. getEntries(). findAll { s -> s instanceof SourceFolder }. eachWithIndex { s , i ->
100
+ s. setOutput(" out/eclipse" + i)
101
101
}
102
+ }
102
103
}
103
104
104
105
tasks. withType(JavaCompile ). configureEach {
0 commit comments