Sign masterpassword-gui under Gradle.
This commit is contained in:
parent
1bd61759bf
commit
c43cc73ad5
@ -1,7 +1,15 @@
|
|||||||
To build a release distribution:
|
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:
|
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.
|
- 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).
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
allprojects {
|
allprojects {
|
||||||
//apply plugin: 'findbugs'
|
apply plugin: 'findbugs'
|
||||||
|
|
||||||
group = 'com.lyndir.masterpassword'
|
group = 'com.lyndir.masterpassword'
|
||||||
version = 'GIT-SNAPSHOT'
|
version = 'GIT-SNAPSHOT'
|
||||||
|
@ -18,19 +18,19 @@ android {
|
|||||||
jackOptions.enabled true
|
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 {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
storeFile file( 'masterpassword.keystore' )
|
storeFile file( 'masterpassword.keystore' )
|
||||||
storePassword System.getenv( 'STORE_PW' )
|
storePassword System.getenv( 'STORE_PW' )
|
||||||
|
|
||||||
keyAlias 'masterpassword-android'
|
keyAlias 'masterpassword-android'
|
||||||
keyPassword System.getenv( 'KEY_PW' )
|
keyPassword System.getenv( 'KEY_PW_ANDROID' )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
if (System.getenv( 'STORE_PW' ) != null)
|
if (System.getenv( 'KEY_PW_ANDROID' ) != null)
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,9 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<include>target/*.apk</include>
|
<include>target/*.apk</include>
|
||||||
</includes>
|
</includes>
|
||||||
<keystore>release.jks</keystore>
|
<keystore>masterpassword.keystore</keystore>
|
||||||
<storepass>${env.PASSWORD}</storepass>
|
<storepass>${env.STORE_PW}</storepass>
|
||||||
<keypass>${env.PASSWORD}</keypass>
|
<keypass>${env.KEY_PW_ANDROID}</keypass>
|
||||||
<alias>masterpassword-android</alias>
|
<alias>masterpassword-android</alias>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>-sigalg</argument>
|
<argument>-sigalg</argument>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'application'
|
id 'application'
|
||||||
id 'com.github.johnrengelman.shadow' version '1.2.4'
|
id 'com.github.johnrengelman.shadow' version '2.0.4'
|
||||||
}
|
}
|
||||||
|
|
||||||
description = 'Master Password GUI'
|
description = 'Master Password GUI'
|
||||||
@ -14,6 +14,21 @@ dependencies {
|
|||||||
compile group: 'com.yuvimasory', name: 'orange-extensions', version: '1.3.0'
|
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 {
|
run {
|
||||||
// I don't fully understand why this is necessary, but without it -Dmp.log.level is lost.
|
// I don't fully understand why this is necessary, but without it -Dmp.log.level is lost.
|
||||||
systemProperties = System.properties
|
systemProperties = System.properties
|
||||||
|
@ -112,9 +112,9 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<include>target/*.jar</include>
|
<include>target/*.jar</include>
|
||||||
</includes>
|
</includes>
|
||||||
<keystore>release.jks</keystore>
|
<keystore>masterpassword.keystore</keystore>
|
||||||
<storepass>${env.PASSWORD}</storepass>
|
<storepass>${env.STORE_PW}</storepass>
|
||||||
<keypass>${env.PASSWORD}</keypass>
|
<keypass>${env.KEY_PW_DESKTOP}</keypass>
|
||||||
<alias>masterpassword-desktop</alias>
|
<alias>masterpassword-desktop</alias>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>-sigalg</argument>
|
<argument>-sigalg</argument>
|
||||||
|
Loading…
Reference in New Issue
Block a user