You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ja...@apache.org on 2017/09/15 20:01:43 UTC
[geode] 01/01: GEODE-3629: Old versions will be pulled from the
Apache Maven Repo
This is an automated email from the ASF dual-hosted git repository.
jasonhuynh pushed a commit to branch feature/GEODE-3629
in repository https://gitbox.apache.org/repos/asf/geode.git
commit 5731c88a36c0356eacdc8db241a34c28264e48f8
Author: Jason Huynh <hu...@gmail.com>
AuthorDate: Mon Sep 11 16:26:44 2017 -0700
GEODE-3629: Old versions will be pulled from the Apache Maven Repo
---
build.gradle | 3 +++
geode-old-versions/build.gradle | 52 ++++++++++++++---------------------------
2 files changed, 21 insertions(+), 34 deletions(-)
diff --git a/build.gradle b/build.gradle
index e413366..43e21e2 100755
--- a/build.gradle
+++ b/build.gradle
@@ -18,6 +18,9 @@
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
+ maven {
+ url 'https://repository.apache.org/content/repositories/snapshots'
+ }
}
dependencies {
diff --git a/geode-old-versions/build.gradle b/geode-old-versions/build.gradle
index 7defb69..e2578c3 100644
--- a/geode-old-versions/build.gradle
+++ b/geode-old-versions/build.gradle
@@ -15,13 +15,16 @@
* limitations under the License.
*/
-plugins {
- id "de.undercouch.download" version "3.2.0"
-}
-import de.undercouch.gradle.tasks.download.Download
disableMavenPublishing()
+repositories {
+ maven { url "https://plugins.gradle.org/m2/" }
+ maven {
+ url 'https://repository.apache.org/content/repositories/snapshots'
+ }
+}
+
project.ext.installs = new Properties();
def addOldVersion(def source, def geodeVersion, def downloadInstall) {
@@ -38,41 +41,22 @@ def addOldVersion(def source, def geodeVersion, def downloadInstall) {
dependencies.add "${source}Compile", "org.apache.geode:geode-cq:$geodeVersion"
dependencies.add "${source}Compile", "org.apache.geode:geode-rebalancer:$geodeVersion"
- project.ext.installs.setProperty(source, "$buildDir/apache-geode-${geodeVersion}")
-
- task "downloadZipFile${source}" (type: Download) {
- src "https://www.apache.org/dyn/closer.cgi?action=download&filename=geode/$geodeVersion/apache-geode-${geodeVersion}.tar.gz"
- def destFile = new File(buildDir, "apache-geode-${geodeVersion}.tar.gz")
- dest destFile
- onlyIf {!destFile.exists()}
- }
-
- task "downloadSHA${source}" (type: Download) {
- src "https://www.apache.org/dist/geode/${geodeVersion}/apache-geode-${geodeVersion}.tar.gz.sha256"
- def destFile = new File(buildDir, "apache-geode-${geodeVersion}.tar.gz.sha256")
- dest destFile
- onlyIf {!destFile.exists()}
- }
+ if (downloadInstall) {
+ configurations.create("${source}OldInstall")
+ dependencies.add "${source}OldInstall", "org.apache.geode:apache-geode:$geodeVersion"
- task "verifyGeode${source}" (type: de.undercouch.gradle.tasks.download.Verify, dependsOn: [tasks["downloadSHA${source}"], tasks["downloadZipFile${source}"]]) {
- src tasks["downloadZipFile${source}"].dest
- algorithm "SHA-256"
- doFirst {
- checksum new File(buildDir, "apache-geode-${geodeVersion}.tar.gz.sha256").text.split(' ')[0]
+ project.ext.installs.setProperty(source, "$buildDir/apache-geode-${geodeVersion}")
+ task "downloadAndUnzipFile${geodeVersion}"(type: Copy) {
+ from zipTree(configurations["${source}OldInstall"].singleFile)
+ into buildDir
}
- }
-
- task "downloadAndUnzipFile${source}" (dependsOn: "verifyGeode${source}", type: Copy) {
- from tarTree(tasks["downloadZipFile${source}"].dest)
- into buildDir
- }
- if (downloadInstall) {
- createGeodeClasspathsFile.dependsOn tasks["downloadAndUnzipFile${source}"]
+ createGeodeClasspathsFile.dependsOn tasks["downloadAndUnzipFile${geodeVersion}"]
}
}
+
def generatedResources = "$buildDir/generated-resources/main"
sourceSets {
@@ -90,7 +74,7 @@ task createGeodeClasspathsFile {
doLast {
Properties versions = new Properties();
project(':geode-old-versions').sourceSets.each {
- versions.setProperty(it.name,it.runtimeClasspath.getAsPath())
+ versions.setProperty(it.name,it.runtimeClasspath.getAsPath())
}
classpathsFile.getParentFile().mkdirs();
@@ -112,7 +96,7 @@ task createGeodeClasspathsFile {
addOldVersion('test110', '1.1.0', false)
addOldVersion('test111', '1.1.1', false)
addOldVersion('test120', '1.2.0', true)
-
}
+
--
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.