Enforce fail on deprecated gradle usage (7.x backport) (#59758)
* Enforce fail on deprecated gradle usage (#59598) * Fix branch specific deprecated gradle api usages * Fix archiveVersion property usage
This commit is contained in:
parent
3ffb20bdfc
commit
e31ebc96f9
|
@ -45,6 +45,7 @@ import org.gradle.jvm.tasks.Jar
|
|||
|
||||
import java.util.regex.Matcher
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
* Encapsulates build configuration for an Elasticsearch plugin.
|
||||
*/
|
||||
|
@ -147,7 +148,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")
|
||||
|
@ -236,7 +237,7 @@ class PluginBuildPlugin implements Plugin<Project> {
|
|||
}
|
||||
}
|
||||
project.tasks.named(BasePlugin.ASSEMBLE_TASK_NAME).configure {
|
||||
dependsOn(bundle)
|
||||
dependsOn(bundle)
|
||||
}
|
||||
|
||||
// also make the zip available as a configuration (used when depending on this project)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,7 +39,7 @@ if (!isEclipse) {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
java11Compile sourceSets.main.output
|
||||
java11Implementation sourceSets.main.output
|
||||
}
|
||||
|
||||
compileJava11Java {
|
||||
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ ext.expansions = [
|
|||
|
||||
processTestResources {
|
||||
from(sourceSets.test.resources.srcDirs) {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
include '**/*.yml'
|
||||
inputs.properties(expansions)
|
||||
MavenFilteringHack.filter(it, expansions)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue