@@ -34,7 +34,6 @@ import org.gradle.util.GradleVersion
34
34
plugins {
35
35
id ' java-gradle-plugin'
36
36
id ' groovy'
37
- id ' java-test-fixtures'
38
37
}
39
38
40
39
group = ' org.opensearch.gradle'
@@ -79,9 +78,17 @@ if (JavaVersion.current() < JavaVersion.VERSION_11) {
79
78
}
80
79
81
80
sourceSets {
81
+ test {
82
+ java {
83
+ srcDirs + = [' src/testFixtures/java' ]
84
+ }
85
+ }
82
86
integTest {
83
87
compileClasspath + = sourceSets[" main" ]. output + configurations[" testRuntimeClasspath" ]
84
88
runtimeClasspath + = output + compileClasspath
89
+ java {
90
+ srcDirs + = [' src/testFixtures/java' ]
91
+ }
85
92
}
86
93
}
87
94
@@ -111,7 +118,7 @@ dependencies {
111
118
api ' org.apache.rat:apache-rat:0.15'
112
119
api ' commons-io:commons-io:2.13.0'
113
120
api " net.java.dev.jna:jna:5.13.0"
114
- api ' gradle.plugin. com.github.johnrengelman:shadow:8.0.0 '
121
+ api ' com.github.johnrengelman:shadow:8.1.1 '
115
122
api ' org.jdom:jdom2:2.0.6.1'
116
123
api " org.jetbrains.kotlin:kotlin-stdlib-jdk8:${ props.getProperty('kotlin')} "
117
124
api ' de.thetaphi:forbiddenapis:3.5.1'
@@ -124,10 +131,10 @@ dependencies {
124
131
api " com.fasterxml.jackson.core:jackson-databind:${ props.getProperty('jackson_databind')} "
125
132
api " org.ajoberstar.grgit:grgit-core:5.2.0"
126
133
127
- testFixturesApi " junit:junit:${ props.getProperty('junit')} "
128
- testFixturesApi " com.carrotsearch.randomizedtesting:randomizedtesting-runner:${ props.getProperty('randomizedrunner')} "
129
- testFixturesApi gradleApi()
130
- testFixturesApi gradleTestKit()
134
+ testImplementation " junit:junit:${ props.getProperty('junit')} "
135
+ testImplementation " com.carrotsearch.randomizedtesting:randomizedtesting-runner:${ props.getProperty('randomizedrunner')} "
136
+ testRuntimeOnly gradleApi()
137
+ testRuntimeOnly gradleTestKit()
131
138
testImplementation ' com.github.tomakehurst:wiremock-jre8-standalone:2.35.0'
132
139
testImplementation " org.mockito:mockito-core:${ props.getProperty('mockito')} "
133
140
integTestImplementation(' org.spockframework:spock-core:2.3-groovy-3.0' ) {
@@ -164,8 +171,10 @@ if (project != rootProject) {
164
171
apply plugin : ' opensearch.publish'
165
172
166
173
allprojects {
167
- targetCompatibility = JavaVersion . VERSION_11
168
- sourceCompatibility = JavaVersion . VERSION_11
174
+ java {
175
+ targetCompatibility = JavaVersion . VERSION_11
176
+ sourceCompatibility = JavaVersion . VERSION_11
177
+ }
169
178
}
170
179
171
180
// groovydoc succeeds, but has some weird internal exception...
@@ -174,7 +183,7 @@ if (project != rootProject) {
174
183
// build-tools is not ready for primetime with these...
175
184
tasks. named(" dependencyLicenses" ). configure { it. enabled = false }
176
185
dependenciesInfo. enabled = false
177
- disableTasks(' forbiddenApisMain' , ' forbiddenApisTest' , ' forbiddenApisIntegTest' , ' forbiddenApisTestFixtures ' )
186
+ disableTasks(' forbiddenApisMain' , ' forbiddenApisTest' , ' forbiddenApisIntegTest' )
178
187
jarHell. enabled = false
179
188
thirdPartyAudit. enabled = false
180
189
if (org.opensearch.gradle.info.BuildParams . inFipsJvm) {
@@ -241,12 +250,6 @@ if (project != rootProject) {
241
250
}
242
251
}
243
252
244
- // disable fail-on-warnings for this specific task which trips Java 11 bug
245
- // https://bugs.openjdk.java.net/browse/JDK-8209058
246
- tasks. named(" compileTestFixturesJava" ). configure {
247
- options. compilerArgs - = ' -Werror'
248
- }
249
-
250
253
tasks. register(" integTest" , Test ) {
251
254
inputs. dir(file(" src/testKit" )). withPropertyName(" testkit dir" ). withPathSensitivity(PathSensitivity . RELATIVE )
252
255
systemProperty ' test.version_under_test' , version
0 commit comments