Skip to content
Snippets Groups Projects
Select Git revision
  • 58ce95463f5c2a4090c294a02e262bf11eafbcd8
  • master default protected
  • release/1.1.4
  • release/1.1.3
  • release/1.1.1
  • 1.4.2
  • 1.4.1
  • 1.4.0
  • 1.3.0
  • 1.2.1
  • 1.2.0
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.1
  • 1.1.0
  • 1.0.9
  • 1.0.8
  • 1.0.7
  • v1.0.5
  • 1.0.5
21 results

build.gradle

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    build.gradle 1.05 KiB
    apply plugin: 'base'
    
    deploy <<{
    	
    	content = new File("${project.name}/META-INF/MANIFEST.MF").getText("UTF-8") 
    
    	 
    
    	printFileLine = { 
    		if(  it ==~ /Bundle-Version.+qualifier/ ){
    			versionNumber = it.substring(16) // possibile error: cuts off first 16 chars 
    			
    			/*	Version Number is taken from Bundle-Version in Manifest.MF
    			*	If there is no Bundle-Version or the versionnumber needs to
    			*	be taken from a different key word, please change the
    			*	regular expression and the substring above
    			*/
    			
    		}
    		
    		if(  it ==~ /Bundle-SymbolicName:.+/ ){
    			artifactId = it.substring(21)
    			artifactId = artifactId.replace(";singleton:=true",'')
    		}
    		/*	Artifact ID is taken from Bundle-SymbolicName minus the
    		*	16 chars ';singleton:=true'
    		*/
    	}
    	
    	content.eachLine( printFileLine )
    	
    	
    	println artifactId
    	println "\t"+versionNumber
    	
    	def f = new File(artifactId+'/pom.xml') 
    	f.delete()
    	f << start()+elder()+repos()+artifact(artifactId, versionNumber)+end()
    	/*	
    	*	old pom.xml files are deleted and replaced by new auto generated Tycho pom.xml files
    	*/
    	
    }