Files
coco 7846a45f2c a
2026-07-03 15:47:27 +08:00

120 lines
4.2 KiB
Groovy

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
google()
}
apply plugin: 'com.android.application'
def clientProps = new Properties()
def clientPropFile = new File('client.properties')
if (clientPropFile.canRead()) {
clientProps.load(new FileInputStream(clientPropFile))
}
ext {
if (clientProps.containsKey('ClientId')
&& clientProps.containsKey('ClientSecret')) {
ClientId = clientProps['ClientId']
ClientSecret = clientProps['ClientSecret']
} else {
println 'client.properties not found or incomplete'
}
}
android {
signingConfigs {
playStore
}
compileSdkVersion 32
buildToolsVersion '32.0.0'
defaultConfig {
minSdkVersion 19
targetSdkVersion 30
versionCode 70
versionName "4.6.7"
applicationId "com.gh4a"
multiDexEnabled true
buildConfigField 'String', 'CLIENT_ID', ClientId
buildConfigField 'String', 'CLIENT_SECRET', ClientSecret
}
buildTypes {
debug {
applicationIdSuffix '.debug'
zipAlignEnabled true
}
release {
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.playStore
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
namespace 'com.gh4a'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.browser:browser:1.4.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.print:print:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.work:work-runtime:2.7.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.4'
implementation 'com.squareup.retrofit2:converter-moshi:2.6.4'
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.13'
implementation('com.squareup.retrofit2:converter-simplexml:2.6.4') {
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
exclude group: 'xpp3', module: 'xpp3'
}
implementation 'com.github.maniac103:rxloader:master-SNAPSHOT'
implementation 'com.github.maniac103:githubsdk:0.7.0.10'
implementation 'com.larswerkman:HoloColorPicker:1.5@aar'
implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.6.Final'
implementation 'com.github.castorflex.smoothprogressbar:library:1.3.0'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'com.github.pluscubed:recycler-fast-scroll:3de76812553a77bfd25d3aea0a0af4d96516c3e3@aar'
implementation('com.vdurmont:emoji-java:5.1.1') {
exclude group: 'org.json', module : 'json'
}
implementation 'com.github.Tunous:MarkdownEdit:1.0.0'
implementation 'com.github.qoqa:traceur:2.2.12'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.robolectric:robolectric:4.4'
}
def props = new Properties()
def propFile = new File('signing.properties')
if (propFile.canRead()) {
props.load(new FileInputStream(propFile))
}
if (props.containsKey('STORE_FILE')
&& props.containsKey('STORE_PASSWORD')
&& props.containsKey('KEY_ALIAS')
&& props.containsKey('KEY_PASSWORD')) {
android.signingConfigs.playStore.storeFile = file(props['STORE_FILE'])
android.signingConfigs.playStore.storePassword = props['STORE_PASSWORD']
android.signingConfigs.playStore.keyAlias = props['KEY_ALIAS']
android.signingConfigs.playStore.keyPassword = props['KEY_PASSWORD']
} else {
println 'signing.properties not found or incomplete'
android.buildTypes.release.signingConfig = null
}