From 7451517d63ceb174268367fe4a5e0782591da1f2 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 21 May 2016 22:40:24 +0200 Subject: stop using intermediate projects for config inheritance --- build.gradle | 7 +++--- packages/grails/build.gradle | 22 ------------------- packages/grails/grails.gradle | 28 ++++++++++++++++++++++++ packages/grails/grails2.2.1/build.gradle | 2 ++ packages/grails/grails3.0.x/build.gradle | 2 ++ packages/grails/grails3.1.x/build.gradle | 2 ++ packages/idea-iu/build.gradle | 25 ---------------------- packages/idea-iu/idea-iu.gradle | 31 +++++++++++++++++++++++++++ packages/idea-iu/idea-iu15/build.gradle | 2 ++ packages/idea-iu/idea-iu2016/build.gradle | 2 ++ packages/oraclejdk/build.gradle | 28 ------------------------ packages/oraclejdk/oracle.gradle | 34 ++++++++++++++++++++++++++++++ packages/oraclejdk/oraclejdk7/build.gradle | 4 +++- packages/oraclejdk/oraclejdk8/build.gradle | 2 ++ 14 files changed, 111 insertions(+), 80 deletions(-) delete mode 100644 packages/grails/build.gradle create mode 100644 packages/grails/grails.gradle delete mode 100644 packages/idea-iu/build.gradle create mode 100644 packages/idea-iu/idea-iu.gradle delete mode 100644 packages/oraclejdk/build.gradle create mode 100644 packages/oraclejdk/oracle.gradle diff --git a/build.gradle b/build.gradle index ccdc612..5b2e639 100644 --- a/build.gradle +++ b/build.gradle @@ -54,7 +54,6 @@ reindex << { subprojects { group 'org.xapek.yvesf.debian' - version '1.0-SNAPSHOT' apply plugin: 'nebula.ospackage' @@ -93,8 +92,8 @@ subprojects { ] project.extensions.add('activator', activatorExtension) - final createActivatorTask = task('createActivator') - createActivatorTask << { + final activatorTask = task('activator') + activatorTask << { final activatorDir = new File(project.buildDir, "activator") activatorExtension.bin.each { entry -> @@ -121,5 +120,5 @@ subprojects { } } - tasks.getByName('buildDeb').dependsOn(createActivatorTask) + tasks.getByName('buildDeb').dependsOn(activatorTask) } diff --git a/packages/grails/build.gradle b/packages/grails/build.gradle deleted file mode 100644 index 6a101be..0000000 --- a/packages/grails/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -import org.xapek.yvesf.gradle.DownloadTask - -subprojects { - task download(type: DownloadTask) {} - - task unzip(type: Copy) { - into file("${buildDir}/unpacked/dist") - eachFile { FileCopyDetails fcd -> - fcd.path = fcd.path.substring(path.indexOf('/')+1) - } - } - unzip.dependsOn(download) - - ospackage { - into "/opt/${project.name}" - from unzip.outputs.files - } - - project.afterEvaluate { - unzip.from zipTree(download.destFile) - } -} diff --git a/packages/grails/grails.gradle b/packages/grails/grails.gradle new file mode 100644 index 0000000..1998b61 --- /dev/null +++ b/packages/grails/grails.gradle @@ -0,0 +1,28 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath 'org.xapek.yvesf:gradle-download-task:0.1-SNAPSHOT' + } +} + +task download(type: org.xapek.yvesf.gradle.DownloadTask) {} + +task unzip(type: Copy) { + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/')+1) + } +} +unzip.dependsOn(download) + +ospackage { + into "/opt/${project.name}" + from unzip.outputs.files +} + +project.afterEvaluate { + unzip.from zipTree(download.destFile) +} diff --git a/packages/grails/grails2.2.1/build.gradle b/packages/grails/grails2.2.1/build.gradle index 7cc6b3b..cee5d9d 100644 --- a/packages/grails/grails2.2.1/build.gradle +++ b/packages/grails/grails2.2.1/build.gradle @@ -1,4 +1,6 @@ version '2.2.1' +apply from: '../grails.gradle' + download.source "http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-${project.version}.zip" download.sha256sum '4ec22ff45718a0f4948261f15f7c46e67ab0c2294d83d6c3eddb110d00f9af1d' diff --git a/packages/grails/grails3.0.x/build.gradle b/packages/grails/grails3.0.x/build.gradle index a700108..b4f810e 100644 --- a/packages/grails/grails3.0.x/build.gradle +++ b/packages/grails/grails3.0.x/build.gradle @@ -1,4 +1,6 @@ version '3.0.12' +apply from: '../grails.gradle' + download.source "https://github.com/grails/grails-core/releases/download/v${project.version}/grails-${project.version}.zip" download.sha256sum 'd3b0cf0966a42e3e76ecac593e81c96655b222fa2cc5b5940d1842c8a4753c11' diff --git a/packages/grails/grails3.1.x/build.gradle b/packages/grails/grails3.1.x/build.gradle index 4f59d87..22c9a96 100644 --- a/packages/grails/grails3.1.x/build.gradle +++ b/packages/grails/grails3.1.x/build.gradle @@ -1,4 +1,6 @@ version '3.1.0' +apply from: '../grails.gradle' + download.source "https://github.com/grails/grails-core/releases/download/v${project.version}/grails-${project.version}.zip" download.sha256sum '35bd209d5f85ec6d4c5b152eb9a33142e2ac6cb67496b0853b472214140a9c53' diff --git a/packages/idea-iu/build.gradle b/packages/idea-iu/build.gradle deleted file mode 100644 index 54126f7..0000000 --- a/packages/idea-iu/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -import org.xapek.yvesf.gradle.DownloadTask - -subprojects { - task download(type: DownloadTask) {} - - task untar(type: Copy) { - into file("${buildDir}/unpacked/dist") - eachFile { FileCopyDetails fcd -> - fcd.path = fcd.path.substring(path.indexOf('/')+1) - } - } - untar.dependsOn(download) - - ospackage { - into "/opt/${project.name}" - from untar.outputs.files - } - - activator.bin['idea'] = "/opt/${project.name}/bin/idea.sh" - - project.afterEvaluate { - download.source "https://download.jetbrains.com/idea/ideaIU-${project.version}.tar.gz" - untar.from tarTree(download.destFile) - } -} diff --git a/packages/idea-iu/idea-iu.gradle b/packages/idea-iu/idea-iu.gradle new file mode 100644 index 0000000..5afd834 --- /dev/null +++ b/packages/idea-iu/idea-iu.gradle @@ -0,0 +1,31 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath 'org.xapek.yvesf:gradle-download-task:0.1-SNAPSHOT' + } +} + +task download(type: org.xapek.yvesf.gradle.DownloadTask) {} + +task untar(type: Copy) { + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/')+1) + } +} +untar.dependsOn(download) + +ospackage { + into "/opt/${project.name}" + from untar.outputs.files +} + +activator.bin['idea'] = "/opt/${project.name}/bin/idea.sh" + +project.afterEvaluate { + download.source "https://download.jetbrains.com/idea/ideaIU-${project.version}.tar.gz" + untar.from tarTree(download.destFile) +} diff --git a/packages/idea-iu/idea-iu15/build.gradle b/packages/idea-iu/idea-iu15/build.gradle index 850edb2..9ad3d72 100644 --- a/packages/idea-iu/idea-iu15/build.gradle +++ b/packages/idea-iu/idea-iu15/build.gradle @@ -1,3 +1,5 @@ version '15.0.2' +apply from: '../idea-iu.gradle' + download.sha256sum 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' diff --git a/packages/idea-iu/idea-iu2016/build.gradle b/packages/idea-iu/idea-iu2016/build.gradle index 0dcee59..64479a1 100644 --- a/packages/idea-iu/idea-iu2016/build.gradle +++ b/packages/idea-iu/idea-iu2016/build.gradle @@ -1,3 +1,5 @@ version '2016.1.2' +apply from: '../idea-iu.gradle' + download.sha256sum 'fe51f5e0cd9dde166ff5ff7194221c760e3e5a12e0e3423b7ebb10d42de9b737' diff --git a/packages/oraclejdk/build.gradle b/packages/oraclejdk/build.gradle deleted file mode 100644 index e2e8c90..0000000 --- a/packages/oraclejdk/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -import org.xapek.yvesf.gradle.DownloadTask - -subprojects { - task download(type: DownloadTask) {} - - task untar(type: Copy) { - into file("${buildDir}/unpacked/dist") - eachFile { FileCopyDetails fcd -> - fcd.path = fcd.path.substring(path.indexOf('/') + 1) - } - } - untar.dependsOn(download) - - ospackage { - from untar.outputs.files - } - - project.afterEvaluate { - untar.from tarTree(download.destFile) - } - - tasks.getByName('createActivator').dependsOn('untar') - tasks.getByName('createActivator').doFirst { - file("${buildDir}/unpacked/dist/bin").list().each { - activator.bin[it] = "/opt/${project.name}/bin/${it}" - } - } -} \ No newline at end of file diff --git a/packages/oraclejdk/oracle.gradle b/packages/oraclejdk/oracle.gradle new file mode 100644 index 0000000..498b3d7 --- /dev/null +++ b/packages/oraclejdk/oracle.gradle @@ -0,0 +1,34 @@ +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath 'org.xapek.yvesf:gradle-download-task:0.1-SNAPSHOT' + } +} + +task download(type: org.xapek.yvesf.gradle.DownloadTask) {} + +task untar(type: Copy) { + into file("${buildDir}/unpacked/dist") + eachFile { FileCopyDetails fcd -> + fcd.path = fcd.path.substring(path.indexOf('/') + 1) + } +} +untar.dependsOn(download) + +ospackage { + from untar.outputs.files +} + +project.afterEvaluate { + untar.from tarTree(download.destFile) +} + +tasks.getByName('activator').dependsOn('untar') +tasks.getByName('activator').doFirst { + file("${buildDir}/unpacked/dist/bin").list().each { + activator.bin[it] = "/opt/${project.name}/bin/${it}" + } +} diff --git a/packages/oraclejdk/oraclejdk7/build.gradle b/packages/oraclejdk/oraclejdk7/build.gradle index 97d6f9a..f0ee830 100644 --- a/packages/oraclejdk/oraclejdk7/build.gradle +++ b/packages/oraclejdk/oraclejdk7/build.gradle @@ -1,9 +1,11 @@ version '7.80' +apply from: '../oracle.gradle' + download.source 'http://ftp.heanet.ie/mirrors/funtoo/distfiles/oracle-java/jdk-7u80-linux-x64.tar.gz' download.sha256sum 'bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab4309623' ospackage { into '/usr/lib/jvm/java-7-oraclejdk' } -activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-7-oraclejdk' \ No newline at end of file +activator.env['JAVA_HOME'] = '/usr/lib/jvm/java-7-oraclejdk' diff --git a/packages/oraclejdk/oraclejdk8/build.gradle b/packages/oraclejdk/oraclejdk8/build.gradle index 3af763a..d6d73c7 100644 --- a/packages/oraclejdk/oraclejdk8/build.gradle +++ b/packages/oraclejdk/oraclejdk8/build.gradle @@ -1,5 +1,7 @@ version '8.66' +apply from: '../oracle.gradle' + download.source 'http://ftp.heanet.ie/mirrors/funtoo/distfiles/oracle-java/jdk-8u66-linux-x64.tar.gz' download.sha256sum '7e95ad5fa1c75bc65d54aaac9e9986063d0a442f39a53f77909b044cef63dc0a' -- cgit v1.2.1