|
17 | 17 |
|
18 | 18 | // This adds 'ecjLint' task. |
19 | 19 |
|
20 | | -configure(rootProject) { |
21 | | - apply plugin: deps.plugins.undercouch.download.get().pluginId |
22 | | - |
23 | | - def ecjVersion = deps.versions.ecjP2Drop.get() |
24 | | - def ecjDropJar = project.layout.buildDirectory.file("ecj-drop/${ecjVersion}.jar") |
25 | | - def downloadEcjDrop = tasks.register("downloadEcjDrop", Download, { |
26 | | - src "https://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops4/S-4.36M1-202504031800/${ecjVersion}.jar" |
27 | | - dest project.layout.buildDirectory.dir("ecj-drop") |
28 | | - overwrite false |
29 | | - onlyIf { |
30 | | - !ecjDropJar.get().asFile.exists() |
31 | | - } |
32 | | - }) |
33 | | - |
34 | | - configurations { |
35 | | - ecjDropDeps |
36 | | - } |
37 | | - |
38 | | - artifacts { |
39 | | - add("ecjDropDeps", ecjDropJar, { |
40 | | - builtBy downloadEcjDrop |
41 | | - }) |
42 | | - } |
43 | | -} |
44 | | - |
45 | 20 | def resources = scriptResources(buildscript) |
46 | 21 |
|
47 | 22 | allprojects { |
48 | 23 | plugins.withType(JavaPlugin).configureEach { |
| 24 | + |
| 25 | + // Use Lucene's storage space for "drop" versions that are ahead |
| 26 | + // of official Maven publications. |
| 27 | + // |
| 28 | + // Drop versions are at: |
| 29 | + // https://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops4/S-4.36M1-202504031800/ecj-${ecjVersion}.jar |
| 30 | + boolean useDropMirror = deps.versions.ecj.get() in ["4.36M1"] |
| 31 | + if (useDropMirror) { |
| 32 | + repositories { |
| 33 | + exclusiveContent { |
| 34 | + forRepository { |
| 35 | + ivy { |
| 36 | + url = 'https://s3.amazonaws.com/lucene-testdata/temp-repo/ecj/' |
| 37 | + patternLayout { |
| 38 | + artifact "[artifact]-[revision](.[ext])" |
| 39 | + m2compatible = true |
| 40 | + } |
| 41 | + metadataSources { |
| 42 | + it.artifact() |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + filter { |
| 47 | + includeGroup "org.eclipse.jdt" |
| 48 | + } |
| 49 | + } |
| 50 | + } |
| 51 | + } |
| 52 | + |
49 | 53 | configurations { |
50 | 54 | ecjDeps |
51 | 55 | } |
52 | 56 |
|
53 | 57 | dependencies { |
54 | | - ecjDeps project(path: ":", configuration: "ecjDropDeps") |
| 58 | + ecjDeps deps.ecj |
55 | 59 | } |
56 | 60 |
|
57 | 61 | def ecjConfiguration = configurations.ecjDeps |
|
0 commit comments