Skip to content
Snippets Groups Projects
Commit 2e7fd4a7 authored by birkhoff's avatar birkhoff
Browse files

Dependencies are now downloaded by Gradle

parent 30d49399
Branches
Tags
No related merge requests found
...@@ -63,4 +63,4 @@ Eclipse-BuddyPolicy: registered ...@@ -63,4 +63,4 @@ Eclipse-BuddyPolicy: registered
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: ., Bundle-ClassPath: .,
lib/probcliparser.jar, lib/probcliparser.jar,
lib/commons-lang-2.4.jar lib/dependencies/commons-lang-2.4.jar
...@@ -4,6 +4,6 @@ bin.includes = META-INF/,\ ...@@ -4,6 +4,6 @@ bin.includes = META-INF/,\
plugin.xml,\ plugin.xml,\
.,\ .,\
lib/probcliparser.jar,\ lib/probcliparser.jar,\
lib/commons-lang-2.4.jar,\ lib/dependencies/commons-lang-2.4.jar,\
prob/ prob/
File deleted
targetRepositories = ["http://cobra.cs.uni-duesseldorf.de/prob_dev_target/","http://download.eclipse.org/releases/indigo/"] targetRepositories = ["http://cobra.cs.uni-duesseldorf.de/prob_dev_target/","http://download.eclipse.org/releases/indigo/"]
apply from: 'http://cobra.cs.uni-duesseldorf.de/artifactory//plugins-snapshot-local/tycho_build-SNAPSHOT.gradle' apply from: 'tycho_build.gradle'
// Local tasks // Local tasks
project(':de.prob.core') {
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
}
}
def download(address,target) { def download(address,target) {
def file = new FileOutputStream(target) def file = new FileOutputStream(target)
def out = new BufferedOutputStream(file) def out = new BufferedOutputStream(file)
......
...@@ -10,6 +10,13 @@ try{ ...@@ -10,6 +10,13 @@ try{
workspacePath = "../" workspacePath = "../"
} }
try{
dependencyFolder = dependencyFolder
}catch(MissingPropertyException e){
dependencyFolder = "lib/dependencies/" // Folder in each subproject where
}
try{ try{
groupID = groupID groupID = groupID
}catch(MissingPropertyException e){ }catch(MissingPropertyException e){
...@@ -114,6 +121,8 @@ def groupId(){ ...@@ -114,6 +121,8 @@ def groupId(){
*/ */
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
// -- !!! DEFINING SUB PROJECTS !!! -- // // -- !!! DEFINING SUB PROJECTS !!! -- //
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
...@@ -121,11 +130,22 @@ def groupId(){ ...@@ -121,11 +130,22 @@ def groupId(){
subprojects { subprojects {
apply plugin: 'base' apply plugin: 'base'
apply plugin: 'java'
task deleteArtifacts(type: Delete) { task deleteArtifacts(type: Delete) {
delete 'target','pom.xml' delete 'target','pom.xml'
} }
///// Copy Dependencies into subprojects DependencyFolder /////
task collectDependencies(type: Copy){
from configurations.compile
into "../"+workspacePath+project.name+"/${dependencyFolder}"
}
////////////////////////////////////////////////////////////////////////////////////////////
task deploy() <<{ task deploy() <<{
description = "\tGenerating the Tycho Poms. Please remember to add a '.qualifier' to the version numbers!" description = "\tGenerating the Tycho Poms. Please remember to add a '.qualifier' to the version numbers!"
...@@ -295,6 +315,12 @@ task install(dependsOn: [createPoms] , type:Exec) { ...@@ -295,6 +315,12 @@ task install(dependsOn: [createPoms] , type:Exec) {
commandLine 'mvn', 'install', '-f', workspacePath+parentID+'/pom.xml' commandLine 'mvn', 'install', '-f', workspacePath+parentID+'/pom.xml'
} }
task completeInstall(dependsOn: [subprojects.collectDependencies, createPoms], type:Exec ){
description = "\tCopies dependencies into dependencyFolder of each subproject and executes a 'mvn install' of the parent pom.xml and auto-generates Tycho Poms"
commandLine 'mvn', 'install', '-f', workspacePath+parentID+'/pom.xml'
}
//--- Defining Tycho POM parts --// //--- Defining Tycho POM parts --//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment