mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 04:28:00 +01:00
use a more modern way of signing apps
This commit is contained in:
parent
f4192a25fc
commit
e92836353c
6 changed files with 20 additions and 29 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,4 +8,4 @@
|
||||||
/build
|
/build
|
||||||
/captures
|
/captures
|
||||||
keystore.jks
|
keystore.jks
|
||||||
signing.properties
|
keystore.properties
|
||||||
|
|
|
@ -3,6 +3,10 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
|
||||||
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
buildToolsVersion "28.0.3"
|
buildToolsVersion "28.0.3"
|
||||||
|
@ -18,7 +22,12 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release
|
release {
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storeFile file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
@ -63,9 +72,9 @@ dependencies {
|
||||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||||
kapt 'com.github.bumptech.glide:compiler:4.8.0' // keep it here too, not just in Commons, else loading SVGs wont work
|
kapt 'com.github.bumptech.glide:compiler:4.8.0' // keep it here too, not just in Commons, else loading SVGs wont work
|
||||||
|
|
||||||
kapt "androidx.room:room-compiler:2.0.0"
|
kapt 'androidx.room:room-compiler:2.0.0'
|
||||||
implementation "androidx.room:room-runtime:2.0.0"
|
implementation 'androidx.room:room-runtime:2.0.0'
|
||||||
annotationProcessor "androidx.room:room-compiler:2.0.0"
|
annotationProcessor 'androidx.room:room-compiler:2.0.0'
|
||||||
|
|
||||||
//implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
|
//implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
|
||||||
implementation 'com.github.tibbi:subsampling-scale-image-view:v3.10.1-fork'
|
implementation 'com.github.tibbi:subsampling-scale-image-view:v3.10.1-fork'
|
||||||
|
@ -73,22 +82,3 @@ dependencies {
|
||||||
// implementation 'com.github.chrisbanes:PhotoView:2.1.4'
|
// implementation 'com.github.chrisbanes:PhotoView:2.1.4'
|
||||||
implementation 'com.github.tibbi:PhotoView:2.2.1-fork'
|
implementation 'com.github.tibbi:PhotoView:2.2.1-fork'
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties props = new Properties()
|
|
||||||
def propFile = new File('signing.properties')
|
|
||||||
if (propFile.canRead()) {
|
|
||||||
props.load(new FileInputStream(propFile))
|
|
||||||
|
|
||||||
if (props != null && props.containsKey('STORE_FILE') && props.containsKey('KEY_ALIAS') && props.containsKey('PASSWORD')) {
|
|
||||||
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
|
||||||
android.signingConfigs.release.storePassword = props['PASSWORD']
|
|
||||||
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
|
||||||
android.signingConfigs.release.keyPassword = props['PASSWORD']
|
|
||||||
} else {
|
|
||||||
println 'signing.properties found but some entries are missing'
|
|
||||||
android.buildTypes.release.signingConfig = null
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println 'signing.properties not found'
|
|
||||||
android.buildTypes.release.signingConfig = null
|
|
||||||
}
|
|
||||||
|
|
BIN
app/release/gallery-release.apk
Normal file
BIN
app/release/gallery-release.apk
Normal file
Binary file not shown.
|
@ -4,13 +4,13 @@ import android.content.Context
|
||||||
import androidx.room.Database
|
import androidx.room.Database
|
||||||
import androidx.room.Room
|
import androidx.room.Room
|
||||||
import androidx.room.RoomDatabase
|
import androidx.room.RoomDatabase
|
||||||
import com.simplemobiletools.gallery.pro.objects.MyExecutor
|
|
||||||
import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
|
import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
|
||||||
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
|
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
|
||||||
import com.simplemobiletools.gallery.pro.models.Directory
|
import com.simplemobiletools.gallery.pro.models.Directory
|
||||||
import com.simplemobiletools.gallery.pro.models.Medium
|
import com.simplemobiletools.gallery.pro.models.Medium
|
||||||
|
import com.simplemobiletools.gallery.pro.objects.MyExecutor
|
||||||
|
|
||||||
@Database(entities = [(Directory::class), (Medium::class)], version = 4)
|
@Database(entities = [Directory::class, Medium::class], version = 4)
|
||||||
abstract class GalleryDatabase : RoomDatabase() {
|
abstract class GalleryDatabase : RoomDatabase() {
|
||||||
|
|
||||||
abstract fun DirectoryDao(): DirectoryDao
|
abstract fun DirectoryDao(): DirectoryDao
|
||||||
|
|
4
keystore.properties_sample
Normal file
4
keystore.properties_sample
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
storePassword=123456
|
||||||
|
keyPassword=abcdef
|
||||||
|
keyAlias=myAlias
|
||||||
|
storeFile=../keystore.jks
|
|
@ -1,3 +0,0 @@
|
||||||
STORE_FILE=/path/to/your.keystore
|
|
||||||
KEY_ALIAS=projectkeyalias
|
|
||||||
PASSWORD=yourpass
|
|
Loading…
Reference in a new issue