diff --git a/build.gradle b/build.gradle index f3e7de27ce1f8eb47ad5354234c46daab22ba410..359fc213fc7b94967111892b27052b4a3b9dbe3b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ groupID = "de.prob" -features = ["de.prob2.feature"] // must be the same as the folder name +features = ["de.prob2.feature"] // must be the same as the folder name Please remember to add '../' if necessary -descriptions = [["de.prob2.feature": "ProB Rodin Plugin"],["de.prob2.feature": """ProB is an animator and model checker for the B-Method. It allows +descriptions = [["../de.prob2.feature": "ProB Rodin Plugin"],["../de.prob2.feature": """ProB is an animator and model checker for the B-Method. It allows fully automatic animation of many B specifications, and can be used to systematically check a specification for errors. Part of the research and development was conducted within the @@ -17,6 +17,8 @@ parentID = groupID+".parent" // will be the same as the folder name targetRepositories = ["http://cobra.cs.uni-duesseldorf.de/prob_dev_target/","http://download.eclipse.org/releases/indigo/"] // ps Repository with Target Definition File +workspacePath = "" // Relative Path to workspace directory e.g. your build is located in the folder workspace/buildscript please set relativePath to ".../" + apply from: 'tycho_build.gradle' // Local tasks diff --git a/tycho_build.gradle b/tycho_build.gradle index 05a0e2c8a1b769b0eeefb73e558fa9a1c6420bda..d06aa4b187578d9e6b4f365e6ad2418b05840980 100644 --- a/tycho_build.gradle +++ b/tycho_build.gradle @@ -3,7 +3,10 @@ apply plugin: 'base' def projects(int i){ - return subprojects.name[i] + /// + String subprojectsName = subprojects.name[i] + subprojectsName = subprojectsName.replace(workspacePath,'') + return subprojectsName } // returns the name of a subproject listed in the settings.gradle file @@ -85,7 +88,10 @@ subprojects { if( it ==~ /Bundle-SymbolicName:.+/ ){ artifactId = it.substring(21) - artifactId = artifactId.replace(";singleton:=true",'') + + artifactId = artifactId.replace(";",'') + artifactId = artifactId.replace(" ",'') + artifactId = artifactId.replace("singleton:=true",'') } /* Artifact ID is taken from Bundle-SymbolicName minus the * 16 chars ';singleton:=true' @@ -98,7 +104,7 @@ subprojects { println artifactId println "\t"+versionNumber - def f = new File(artifactId+'/pom.xml') + def f = new File(workspacePath+artifactId+'/pom.xml') f.delete() f << start()+elder()+artifact(artifactId, versionNumber)+end() /* @@ -146,7 +152,7 @@ subprojects { println "\t"+versionNumber - def f = new File(artifactId+'/pom.xml') + def f = new File(workspacePath+artifactId+'/pom.xml') f.delete() f << feature(artifactId, versionNumber) @@ -167,11 +173,11 @@ clean { task createParent() << { // --------- define Parent --------- // - new File("${parentID}").mkdir() + new File(workspacePath+"${parentID}").mkdir() versionNumber = '1.0.0.qualifier' artifactId = parentId() - def f = new File(artifactId+'/pom.xml') + def f = new File(workspacePath+artifactId+'/pom.xml') f.delete() f << parentPom(artifactId) for(int i = 0; i < targetRepositories.size(); i++){ @@ -192,12 +198,12 @@ task createRepository() << { // ------------ define Repository --------- // - new File("${repositoryName}").mkdir() + new File(workspacePath+"${repositoryName}").mkdir() versionNumber = '1.0.0.qualifier' artifactId = repositoryName featureVersionNumber = '1.0.0.qualifier' - def f = new File(artifactId+'/category.xml') + def f = new File(workspacePath+artifactId+'/category.xml') f.delete() f << categoryHead() for(int i = 0; i < features.size(); i++){ @@ -215,7 +221,7 @@ task createRepository() << { } } content.eachLine( printFileLine ) - f << categoryFeatures(features[i], featureVersionNumber) + f << categoryFeatures(features[i].replace(workspacePath,''), featureVersionNumber) }// for for(int i = 0; i < features.size(); i++){ @@ -226,7 +232,7 @@ task createRepository() << { f << categoryEnd() - def pom = new File(artifactId+'/pom.xml') + def pom = new File(workspacePath+artifactId+'/pom.xml') pom.delete() pom << reposi() }// end of repository definition @@ -237,7 +243,7 @@ task createPoms(dependsOn: [createParent, createRepository, subprojects.deploy]) task install(dependsOn: [createPoms] , type:Exec) { description = "\tExecutes a 'mvn install' of the parent pom.xml and auto-generates Tycho Poms" - commandLine 'mvn', 'install', '-f', parentID+'/pom.xml' + commandLine 'mvn', 'install', '-f', workspacePath+parentID+'/pom.xml' }