Apache Lucene open-source search software
Use a temporary repository location to download certain ecj versions ("drops") (#14703)
Dawid Weissca427071708e
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex 1741d10a651..2d26a60ce96 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -8,8 +8,8 @@ assertj = "3.27.3"commons-codec = "1.18.0"# benchmark/ bzip2 compressioncommons-compress = "1.27.1"-# @keep This version refers to ECJ batch compiler from p2 repositories ("drops").-ecjP2Drop = "ecj-4.36M1"+# See ecj-lint.gradle (used for more linting).+ecj = "4.36M1"# java lintingerrorprone = "2.38.0"# markdown documentation generation@@ -67,6 +67,7 @@ antlr-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlr" }assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" }commons-codec = { module = "commons-codec:commons-codec", version.ref = "commons-codec" }commons-compress = { module = "org.apache.commons:commons-compress", version.ref = "commons-compress" }+ecj = { module = "org.eclipse.jdt:ecj", version.ref = "ecj" }errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }flexmark-core = { module = "com.vladsch.flexmark:flexmark", version.ref = "flexmark" }flexmark-ext-abbreviation = { module = "com.vladsch.flexmark:flexmark-ext-abbreviation", version.ref = "flexmark" }diff --git a/gradle/validation/ecj-lint.gradle b/gradle/validation/ecj-lint.gradleindex 80bd9008688..b26c6c1b894 100644--- a/gradle/validation/ecj-lint.gradle+++ b/gradle/validation/ecj-lint.gradle@@ -17,41 +17,45 @@// This adds 'ecjLint' task.-configure(rootProject) {- apply plugin: deps.plugins.undercouch.download.get().pluginId-- def ecjVersion = deps.versions.ecjP2Drop.get()- def ecjDropJar = project.layout.buildDirectory.file("ecj-drop/${ecjVersion}.jar")- def downloadEcjDrop = tasks.register("downloadEcjDrop", Download, {- src "https://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops4/S-4.36M1-202504031800/${ecjVersion}.jar"- dest project.layout.buildDirectory.dir("ecj-drop")- overwrite false- onlyIf {- !ecjDropJar.get().asFile.exists()- }- })-- configurations {- ecjDropDeps- }-- artifacts {- add("ecjDropDeps", ecjDropJar, {- builtBy downloadEcjDrop- })- }-}-def resources = scriptResources(buildscript)allprojects {plugins.withType(JavaPlugin).configureEach {++ // Use Lucene's storage space for "drop" versions that are ahead+ // of official Maven publications.+ //+ // Drop versions are at:+ // https://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops4/S-4.36M1-202504031800/ecj-${ecjVersion}.jar+ boolean useDropMirror = deps.versions.ecj.get() in ["4.36M1"]+ if (useDropMirror) {+ repositories {+ exclusiveContent {+ forRepository {+ ivy {+ url = 'https://s3.amazonaws.com/lucene-testdata/temp-repo/ecj/'+ patternLayout {+ artifact "[artifact]-[revision](.[ext])"+ m2compatible = true+ }+ metadataSources {+ it.artifact()+ }+ }+ }+ filter {+ includeGroup "org.eclipse.jdt"+ }+ }+ }+ }+configurations {ecjDeps}dependencies {- ecjDeps project(path: ":", configuration: "ecjDropDeps")+ ecjDeps deps.ecj}def ecjConfiguration = configurations.ecjDeps