Skip to content

Commit

Permalink
Enforce fail on deprecated gradle usage (7.9 backport) (#59851)
Browse files Browse the repository at this point in the history
* Enforce fail on deprecated gradle usage (#59598)
* Fix remaining gradle api deprecations
  • Loading branch information
breskeby committed Jul 20, 2020
1 parent bf3f7bb commit 78d19e2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class PluginBuildPlugin implements Plugin<Project> {
project.pluginManager.apply('nebula.maven-base-publish')
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
project.tasks.withType(Jar) {
baseName = baseName + "-client"
archiveBaseName = archiveBaseName.get() + "-client"
}
// always configure publishing for client jars
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name + "-client")
Expand Down
6 changes: 0 additions & 6 deletions client/transport/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ dependencies {
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
}

dependencyLicenses {
dependencies = project.configurations.runtime.fileCollection {
it.group.startsWith('org.elasticsearch') == false
}
}

forbiddenApisTest {
// we don't use the core test-framework, no lucene classes present so we don't want the es-test-signatures to
// be pulled in
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ options.forkOptions.memoryMaximumSize=2g
# Disable duplicate project id detection
# See https://docs.gradle.org/current/userguide/upgrading_version_6.html#duplicate_project_names_may_cause_publication_to_fail
systemProp.org.gradle.dependency.duplicate.project.detection=false

# Enforce the build to fail on deprecated gradle api usage
systemProp.org.gradle.warning.mode=fail
6 changes: 1 addition & 5 deletions libs/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (!isEclipse) {
}

dependencies {
java11Compile sourceSets.main.output
java11Implementation sourceSets.main.output
}

compileJava11Java {
Expand Down Expand Up @@ -71,10 +71,6 @@ dependencies {
testImplementation "junit:junit:${versions.junit}"
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"

if (!isEclipse) {
java11Compile sourceSets.main.output
}

testImplementation(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
}
Expand Down
1 change: 1 addition & 0 deletions x-pack/qa/smoke-test-plugins-ssl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ ext.expansions = [

processTestResources {
from(sourceSets.test.resources.srcDirs) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
include '**/*.yml'
inputs.properties(expansions)
MavenFilteringHack.filter(it, expansions)
Expand Down
1 change: 1 addition & 0 deletions x-pack/qa/third-party/active-directory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ testFixtures.useFixture ":x-pack:test:smb-fixture"

// add test resources from security, so tests can use example certs
processTestResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(project(xpackModule('core')).sourceSets.test.resources.srcDirs)
from(project(xpackModule('security')).sourceSets.test.resources.srcDirs)
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/snapshot-tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ task buildTarArchive(dependsOn: copyRuntimeLibs, type: Tar) {
compression Compression.GZIP
archiveBaseName.set('snapshot-tool')
destinationDirectory.set(project.buildDir)
into "snapshot-tool-${version}", {
into "snapshot-tool-${archiveVersion.get()}", {
into "bin", {
from file("${project.projectDir}/src/bin")
}
Expand Down

0 comments on commit 78d19e2

Please sign in to comment.