aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle10
-rw-r--r--pdf-as-lib/build.gradle9
-rw-r--r--pdf-as-web/build.gradle10
3 files changed, 26 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 25d48445..d440a67f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,6 +12,7 @@ buildscript {
allprojects {
apply plugin: 'com.github.ben-manes.versions'
repositories { mavenCentral() }
+ version = '4.0.1'
}
configurations {
@@ -60,7 +61,6 @@ subprojects {
}
sourceCompatibility = 1.6
- version = '4.0.1'
project.ext{
releaseRepoUrl = "file://${project(':').projectDir}/../mvn-repo/releases"
snapshotRepoUrl = "file://${project(':').projectDir}/../mvn-repo/snapshots"
@@ -90,6 +90,14 @@ subprojects {
}
}
+task releases(type: Copy) {
+ from ('doc') {
+ include '*.pdf'
+ }
+
+ into "releases/" + version + "/docs"
+}
+
def getCheckedOutGitCommitHash() {
def gitFolder = "$projectDir/.git/"
def takeFromHash = 40
diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle
index 7f3e1add..114faebc 100644
--- a/pdf-as-lib/build.gradle
+++ b/pdf-as-lib/build.gradle
@@ -60,12 +60,19 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
}
+task releaseConfig(type: Copy) {
+ from 'src/main/resources/config/config.zip'
+ into rootDir.toString() + "/releases/" + version + "/cfg"
+ rename 'config.zip', 'defaultConfig.zip'
+}
+
task releases(type: Copy) {
from jar.outputs
into rootDir.toString() + "/releases/" + version
- rename '.*.war', 'pdf-as-web.war'
}
+releases.dependsOn releaseConfig
+
task apidocs(type: Javadoc) {
classpath = configurations.compile
source = sourceSets.main.allJava
diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle
index ede67c2c..6b88f734 100644
--- a/pdf-as-web/build.gradle
+++ b/pdf-as-web/build.gradle
@@ -120,7 +120,7 @@ task putWebConfigIntoTomcat(dependsOn: putConfigIntoTomcat, type: Copy) {
}
task injectPdfAsWebApp(dependsOn: putWebConfigIntoTomcat, type: Copy) {
- war.execute();
+ //war.execute();
String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##/webapps/";
targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
@@ -130,6 +130,8 @@ task injectPdfAsWebApp(dependsOn: putWebConfigIntoTomcat, type: Copy) {
rename '.*.war', 'pdf-as-web.war'
}
+injectPdfAsWebApp.dependsOn war
+
task buildTomcat(dependsOn: injectPdfAsWebApp, type: Zip) {
String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##";
targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
@@ -171,4 +173,10 @@ task releases(dependsOn: buildTomcat, type: Copy) {
into rootDir.toString() + "/releases/" + version
}
+task releaseConfig(type: Copy) {
+ from 'src/main/configuration/pdf-as-web.properties'
+ into rootDir.toString() + "/releases/" + version + "/cfg"
+}
+
+releases.dependsOn releaseConfig
releases.dependsOn buildTomcatTar