mirror of https://github.com/perkeep/perkeep.git
clients/android: add steps to sign the apk
Change-Id: I776dd14efca4bd10263a7c7422e0ffd5c706a523
This commit is contained in:
parent
66e6766571
commit
e35db56405
|
@ -10,13 +10,16 @@ env:
|
|||
docker build -t perkeep/android devenv
|
||||
|
||||
dockerdev:
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android /bin/bash
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -v $(HOME)/keys:/keys -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android /bin/bash
|
||||
|
||||
dockerdebug:
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android go run build-in-docker.go
|
||||
|
||||
dockerrelease:
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android go run build-in-docker.go -release=true
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -v $(HOME)/keys:/keys -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android go run build-in-docker.go -release=true
|
||||
|
||||
dockersignrelease:
|
||||
docker run --rm -v $(GOPATH)/src/perkeep.org:/home/gopher/src/perkeep.org -v $(HOME)/.gradle:/home/gopher/.gradle -v $(HOME)/.android:/home/gopher/.android -v $(HOME)/keys:/keys -w /home/gopher/src/perkeep.org/clients/android --name camlidroid -i -t perkeep/android /home/gopher/android-sdk/build-tools/27.0.0/apksigner sign --ks /keys/perkeep-android.keystore --out ./app/build/outputs/apk/release/app-release.apk ./app/build/outputs/apk/release/app-release-unsigned.apk
|
||||
|
||||
# just for documentation, as make is not actually installed in the docker image.
|
||||
debug:
|
||||
|
@ -27,8 +30,7 @@ installdebug:
|
|||
adb install -r app/build/outputs/apk/debug/app-debug.apk
|
||||
|
||||
install:
|
||||
# TODO(bradfitz): step to sign app/build/outputs/apk/app-release-unsigned.apk
|
||||
# adb install -r app/build/outputs/apk/app-release.apk
|
||||
adb install -r app/build/outputs/apk/release/app-release.apk
|
||||
|
||||
test:
|
||||
# TODO(mpl): can't run the instrumentation tests within docker, since
|
||||
|
|
|
@ -5,9 +5,30 @@
|
|||
*/
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
// Create a variable called keystorePropertiesFile, and initialize it to your
|
||||
// keystore.properties file, in the rootProject folder.
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
|
||||
// Initialize a new Properties() object called keystoreProperties.
|
||||
def keystoreProperties = new Properties()
|
||||
|
||||
// Load your keystore.properties file into the keystoreProperties object.
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
|
||||
// TODO(mpl): this should make signing the apk automatic when building the
|
||||
// release flavor, but it does not seem to. figure out why. use Makefile in the
|
||||
// meantime.
|
||||
signingConfigs {
|
||||
config {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.camlistore"
|
||||
minSdkVersion 14
|
||||
|
|
Loading…
Reference in New Issue