Skip to content

Commit 09f15c5

Browse files
authored
Getting rid of gradle deprecation warnings (#1792)
Gradle has deprecated several features, and irritatingly it fails the build if you use those features without passing the "--warning-mode=none" argument. This commit replaces those deprecated things so that you can run the build without passing "--warning-mode=none".
1 parent 6c60327 commit 09f15c5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

buildSrc/src/main/groovy/org/elasticsearch/hadoop/gradle/BuildPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class BuildPlugin implements Plugin<Project> {
378378

379379
// Enable HTML test reports
380380
project.tasks.withType(Test) { Test testTask ->
381-
testTask.getReports().getByName('html').setEnabled(true)
381+
testTask.getReports().getByName('html').setRequired(true)
382382
}
383383

384384
// Configure project jar task with manifest and include license and notice data.
@@ -846,7 +846,7 @@ class BuildPlugin implements Plugin<Project> {
846846
maxGranularity 2
847847
}
848848

849-
integrationTest.reports.html.enabled = false
849+
integrationTest.reports.html.required = false
850850
}
851851

852852
private static void configurePrecommit(Project project) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

test/fixtures/minikdc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ targetCompatibility = '1.8'
4040
// gradle hides EVERYTHING so you have no clue what went wrong.
4141
task kdc(type: JavaExec) {
4242
classpath = sourceSets.main.compileClasspath + sourceSets.main.output
43-
main = "org.elasticsearch.hadoop.test.fixture.minikdc.MiniKdcFixture"
43+
mainClass = "org.elasticsearch.hadoop.test.fixture.minikdc.MiniKdcFixture"
4444
args = [ 'build/fixtures/miniKdcFixture' ]
4545
}
4646

0 commit comments

Comments
 (0)