diff --git a/gradle/README.md b/gradle/README.md
index 41a86ad8..8fdb2a38 100644
--- a/gradle/README.md
+++ b/gradle/README.md
@@ -1,7 +1,15 @@
To build a release distribution:
-STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-android) gradle assembleRelease
+Desktop:
+
+ STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-desktop) gradle clean masterpassword-gui:shadowJar
+
+Android:
+
+ STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-android) gradle clean masterpassword-android:assembleRelease
+
Note:
- At the time of writing, Android does not build with JDK 9+. As such, the above command must be ran with JAVA_HOME pointing to JDK 7-8.
+ - The release keystores are not included in the repository. They are maintained by Maarten Billemont (lhunath@lyndir.com).
diff --git a/gradle/build.gradle b/gradle/build.gradle
index 8493e69f..e5b23dcd 100644
--- a/gradle/build.gradle
+++ b/gradle/build.gradle
@@ -1,5 +1,5 @@
allprojects {
- //apply plugin: 'findbugs'
+ apply plugin: 'findbugs'
group = 'com.lyndir.masterpassword'
version = 'GIT-SNAPSHOT'
diff --git a/platform-android/build.gradle b/platform-android/build.gradle
index 9bf06c55..15cb99cc 100644
--- a/platform-android/build.gradle
+++ b/platform-android/build.gradle
@@ -18,19 +18,19 @@ android {
jackOptions.enabled true
}
- // release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW=$(mpw masterpassword-android) gradle assembleRelease
+ // release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW_ANDROID=$(mpw masterpassword-android) gradle masterpassword-android:assembleRelease
signingConfigs {
release {
storeFile file( 'masterpassword.keystore' )
storePassword System.getenv( 'STORE_PW' )
keyAlias 'masterpassword-android'
- keyPassword System.getenv( 'KEY_PW' )
+ keyPassword System.getenv( 'KEY_PW_ANDROID' )
}
}
buildTypes {
release {
- if (System.getenv( 'STORE_PW' ) != null)
+ if (System.getenv( 'KEY_PW_ANDROID' ) != null)
signingConfig signingConfigs.release
}
}
diff --git a/platform-android/pom.xml b/platform-android/pom.xml
index 25a61c99..d08d0451 100644
--- a/platform-android/pom.xml
+++ b/platform-android/pom.xml
@@ -82,9 +82,9 @@
target/*.apk
- release.jks
- ${env.PASSWORD}
- ${env.PASSWORD}
+ masterpassword.keystore
+ ${env.STORE_PW}
+ ${env.KEY_PW_ANDROID}
masterpassword-android
-sigalg
diff --git a/platform-independent/gui-java/build.gradle b/platform-independent/gui-java/build.gradle
index 92e546ae..e69bd042 100644
--- a/platform-independent/gui-java/build.gradle
+++ b/platform-independent/gui-java/build.gradle
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'application'
- id 'com.github.johnrengelman.shadow' version '1.2.4'
+ id 'com.github.johnrengelman.shadow' version '2.0.4'
}
description = 'Master Password GUI'
@@ -14,6 +14,21 @@ dependencies {
compile group: 'com.yuvimasory', name: 'orange-extensions', version: '1.3.0'
}
+
+// release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW_ANDROID=$(mpw masterpassword-android) gradle masterpassword-gui:shadowJar
+shadowJar.doLast {
+ if (System.getenv( 'KEY_PW_DESKTOP' ) != null)
+ ant.signjar(
+ jar: archivePath,
+ alias: 'masterpassword-desktop',
+ keystore: 'masterpassword.keystore',
+ storepass: System.getenv( 'STORE_PW' ),
+ keypass: System.getenv( 'KEY_PW_DESKTOP' ),
+ preservelastmodified: 'true',
+ destdir: '.'
+ )
+}
+
run {
// I don't fully understand why this is necessary, but without it -Dmp.log.level is lost.
systemProperties = System.properties
diff --git a/platform-independent/gui-java/pom.xml b/platform-independent/gui-java/pom.xml
index d17a5b79..9d168a0c 100644
--- a/platform-independent/gui-java/pom.xml
+++ b/platform-independent/gui-java/pom.xml
@@ -112,9 +112,9 @@
target/*.jar
- release.jks
- ${env.PASSWORD}
- ${env.PASSWORD}
+ masterpassword.keystore
+ ${env.STORE_PW}
+ ${env.KEY_PW_DESKTOP}
masterpassword-desktop
-sigalg