diff options
| -rw-r--r-- | build.gradle | 19 | ||||
| -rw-r--r-- | pdf-as-lib/build.gradle | 57 | ||||
| -rw-r--r-- | pdf-as-web/build.gradle | 38 | 
3 files changed, 56 insertions, 58 deletions
| diff --git a/build.gradle b/build.gradle index 7de91879..5a1dc9ee 100644 --- a/build.gradle +++ b/build.gradle @@ -18,20 +18,21 @@ subprojects {  	}  	sourceCompatibility = 1.5 - +	version = '4.0.0-RC9-SNAPSHOT'  	project.ext{  		releaseRepoUrl = "file://${project(':').projectDir}/../mvn-repo/releases"  		snapshotRepoUrl = "file://${project(':').projectDir}/../mvn-repo/snapshots" +		version = '4.0.0-RC9-SNAPSHOT' +		pdfasversion = version +		revision = getCheckedOutGitCommitHash() +		//tomcatVersion = '7.0.54'; +		tomcatVersion = '8.0.9';  	  } -	version = '4.0.0-RC9-SNAPSHOT' -	pdfasversion = version -	revision = getCheckedOutGitCommitHash() -	//tomcatVersion = '7.0.54'; -	tomcatVersion = '8.0.9'; -	jar { manifest.attributes provider: 'EGIZ', 'Specification-Version': getCheckedOutGitCommitHash(), 'Implementation-Version': version  } +	 +	jar { manifest.attributes provider: 'EGIZ', 'Specification-Version': getCheckedOutGitCommitHash(), 'Implementation-Version': project.version  }  	uploadArchives {  		repositories.mavenDeployer { @@ -58,11 +59,11 @@ def getCheckedOutGitCommitHash() {  	def refHead = new File(gitFolder + head[1].trim()) // .git/refs/heads/master  	refHead.text.trim().take takeFromHash  } - +/*  task docs(type: Javadoc) {  	source subprojects.collect {project -> project.sourceSets.main.allJava }  	classpath = files(subprojects.collect {project -> project.sourceSets.main.compileClasspath})  	destinationDir = new File(projectDir, 'docs/full') -} +}*/ diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle index 2215692e..a947bd15 100644 --- a/pdf-as-lib/build.gradle +++ b/pdf-as-lib/build.gradle @@ -69,43 +69,40 @@ task releases(type: Copy) {  task apidocs(type: Javadoc) {  	classpath = configurations.compile  	source = sourceSets.main.allJava -	project.configure(options) { -		destinationDir = new File(projectDir, '../docs/api') -		memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED -		charSet = "ISO-8859-1" -		docTitle = "PDF-AS " + pdfasversion + " Documentation" -		version = pdfasversion -		include = include('at/gv/egiz/pdfas/lib/api/**') -		windowTitle = "PDF-AS " + pdfasversion + " Library" -		header = "<b>PDF-AS " + pdfasversion + " Library  " + pdfasversion + " [" + revision + "]</b>" -		use = "true" -		links("http://java.sun.com/j2ee/1.4/docs/api", "http://java.sun.com/j2se/1.5.0/docs/api") -	} +	destinationDir = new File(rootDir.toString() + "/releases/docs/api") +	title = "PDF-AS " + project.pdfasversion + " Documentation" +	options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PUBLIC +	options.charSet = "ISO-8859-1" +	options.author = "Andreas Fitzek" +	options.docTitle = "PDF-AS " + project.pdfasversion + " Documentation" +	options.version = project.pdfasversion +	options.windowTitle = "PDF-AS " + project.pdfasversion + " Library" +	options.header = "<b>PDF-AS " + project.pdfasversion + " Library  " + project.pdfasversion + " [" + project.revision + "]</b>" +	options.use = "true" +	options.links("http://docs.oracle.com/javase/1.5.0/docs/api/") +	include('at/gv/egiz/pdfas/lib/api/**')  }  task fulldocs(type: Javadoc) {  	classpath = configurations.compile  	source = sourceSets.main.allJava -	project.configure(options) { -		destinationDir = new File(projectDir, '../docs/full') -		memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED -		charSet = "ISO-8859-1" -		docTitle = "PDF-AS " + pdfasversion + " Documentation" -		version = pdfasversion -		include = include('at/gv/egiz/**') -		windowTitle = "PDF-AS " + pdfasversion + " Library" -		header = "<b>PDF-AS " + pdfasversion + " Library  " + pdfasversion + " [" + revision + "]</b>" -		use = "true" -		links("http://java.sun.com/j2ee/1.4/docs/api", "http://java.sun.com/j2se/1.5.0/docs/api") -	} +	destinationDir = new File(rootDir.toString() + "/releases/docs/api") +	title = "PDF-AS " + project.pdfasversion + " Documentation" +	options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED +	options.charSet = "ISO-8859-1" +	options.author = "Andreas Fitzek" +	options.docTitle = "PDF-AS " + project.pdfasversion + " Documentation" +	options.version = project.pdfasversion +	options.windowTitle = "PDF-AS " + project.pdfasversion + " Library" +	options.header = "<b>PDF-AS " + project.pdfasversion + " Library  " + project.pdfasversion + " [" + project.revision + "]</b>" +	options.use = "true" +	options.links("http://docs.oracle.com/javase/1.5.0/docs/api/") +	include('at/knowcenter/wag/egiz/**') +	include('at/gv/egiz/**')  } -task apidocspdf << { -	def proc = "./doc.sh".execute() -	proc.in.eachLine {line -> println line} -	proc.err.eachLine {line -> println 'ERROR: ' + line} -	proc.waitFor() -} +releases.dependsOn apidocs +releases.dependsOn fulldocs  test {  	systemProperties 'property': 'value' diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle index ba356a0d..e081bd32 100644 --- a/pdf-as-web/build.gradle +++ b/pdf-as-web/build.gradle @@ -48,8 +48,8 @@ task downloadTomcat << {  	String url  = "http://repo1.maven.org/maven2/org/apache/tomcat/tomcat/##VERSION##/tomcat-##VERSION##.zip"  	String filename = project.buildDir.toString() + "/tomcat-##VERSION##.zip"; -	url = url.replaceAll("##VERSION##", tomcatVersion); -	filename = filename.replaceAll("##VERSION##", tomcatVersion); +	url = url.replaceAll("##VERSION##", project.tomcatVersion); +	filename = filename.replaceAll("##VERSION##", project.tomcatVersion);  	println "Tomcat Version: " + url @@ -65,12 +65,12 @@ task downloadTomcat << {  task extractTomcat(dependsOn: downloadTomcat, type: Copy) {  	String filename = project.buildDir.toString() + "/tomcat-##VERSION##.zip"; -	filename = filename.replaceAll("##VERSION##", tomcatVersion); +	filename = filename.replaceAll("##VERSION##", project.tomcatVersion);  	inputs.file filename  	String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	def zipFile = file(filename)  	def outputDir = file(targetDir) @@ -81,7 +81,7 @@ task extractTomcat(dependsOn: downloadTomcat, type: Copy) {  task cleanWebAppsInTomcat(dependsOn: extractTomcat) << {  	String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##/webapps/"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	def webappDir = new File(targetDir);  	println "Removing: " + webappDir.toString() @@ -97,7 +97,7 @@ task putTemplateIntoTomcat(dependsOn: cleanWebAppsInTomcat, type: Copy) {  	String source = project.projectDir.toString() + "/";  	String targetDir = "build/tomcat-##VERSION##/apache-tomcat-##VERSION##"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	from 'src/main/assembly/tomcat'  	into targetDir @@ -107,7 +107,7 @@ task putConfigIntoTomcat(dependsOn: putTemplateIntoTomcat, type: Copy) {  	String source = "../pdf-as-lib/build/resources/main/config/config.zip";  	String targetDir = "build/tomcat-##VERSION##/apache-tomcat-##VERSION##/conf/pdf-as"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	from zipTree(source)  	into targetDir @@ -115,7 +115,7 @@ task putConfigIntoTomcat(dependsOn: putTemplateIntoTomcat, type: Copy) {  task putWebConfigIntoTomcat(dependsOn: putConfigIntoTomcat, type: Copy) {  	String targetDir = "build/tomcat-##VERSION##/apache-tomcat-##VERSION##/conf/pdf-as"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	from 'src/main/configuration/'  	into targetDir @@ -125,7 +125,7 @@ task injectPdfAsWebApp(dependsOn: putWebConfigIntoTomcat, type: Copy) {  	war.execute();  	String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##/webapps/"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	from war.outputs  	into targetDir @@ -134,11 +134,11 @@ task injectPdfAsWebApp(dependsOn: putWebConfigIntoTomcat, type: Copy) {  task buildTomcat(dependsOn: injectPdfAsWebApp, type: Zip) {  	String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	String archive = "apache-tomcat-##VERSION##-pdf-as-web-##PVERSION##.zip"; -	archive = archive.replaceAll("##VERSION##", tomcatVersion); -	archive = archive.replaceAll("##PVERSION##", version); +	archive = archive.replaceAll("##VERSION##", project.tomcatVersion); +	archive = archive.replaceAll("##PVERSION##", project.version);  	from targetDir  	archiveName archive @@ -147,11 +147,11 @@ task buildTomcat(dependsOn: injectPdfAsWebApp, type: Zip) {  task buildTomcatTar(dependsOn: injectPdfAsWebApp, type: Tar) {  	String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##"; -	targetDir = targetDir.replaceAll("##VERSION##", tomcatVersion); +	targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);  	String archive = "apache-tomcat-##VERSION##-pdf-as-web-##PVERSION##.tar"; -	archive = archive.replaceAll("##VERSION##", tomcatVersion); -	archive = archive.replaceAll("##PVERSION##", version); +	archive = archive.replaceAll("##VERSION##", project.tomcatVersion); +	archive = archive.replaceAll("##PVERSION##", project.version);  	from targetDir  	archiveName archive @@ -160,12 +160,12 @@ task buildTomcatTar(dependsOn: injectPdfAsWebApp, type: Tar) {  task releases(dependsOn: buildTomcat, type: Copy) {  	String archive = project.buildDir.toString() + "/apache-tomcat-##VERSION##-pdf-as-web-##PVERSION##.zip"; -	archive = archive.replaceAll("##VERSION##", tomcatVersion); -	archive = archive.replaceAll("##PVERSION##", version); +	archive = archive.replaceAll("##VERSION##", project.tomcatVersion); +	archive = archive.replaceAll("##PVERSION##", project.version);  	String tararchive = project.buildDir.toString() + "/apache-tomcat-##VERSION##-pdf-as-web-##PVERSION##.tar"; -	tararchive = tararchive.replaceAll("##VERSION##", tomcatVersion); -	tararchive = tararchive.replaceAll("##PVERSION##", version); +	tararchive = tararchive.replaceAll("##VERSION##", project.tomcatVersion); +	tararchive = tararchive.replaceAll("##PVERSION##", project.version);  	from war.outputs  	from archive | 
