Tidy things up

This commit is contained in:
topjohnwu 2019-05-31 21:46:59 -07:00
parent 373dc10a40
commit 4a73d634e0
3 changed files with 36 additions and 43 deletions

View File

@ -19,16 +19,12 @@ android {
multiDexEnabled true multiDexEnabled true
versionName configProps['appVersion'] versionName configProps['appVersion']
versionCode configProps['appVersionCode'] as Integer versionCode configProps['appVersionCode'] as Integer
javaCompileOptions {
annotationProcessorOptions {
argument('butterknife.debuggable', 'false')
}
}
} }
buildTypes { buildTypes {
release { release {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-moshi.pro', 'proguard-kotlin.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro', 'proguard-moshi.pro', 'proguard-kotlin.pro'
} }
} }
@ -38,12 +34,12 @@ android {
packagingOptions { packagingOptions {
exclude '/META-INF/*.version' exclude '/META-INF/*.version'
//exclude '/META-INF/*.kotlin_module' exclude '/META-INF/*.kotlin_module'
//exclude '/META-INF/rxkotlin.properties' exclude '/META-INF/rxkotlin.properties'
exclude '/androidsupportmultidexversion.txt' exclude '/androidsupportmultidexversion.txt'
exclude '/org/**' exclude '/org/**'
//exclude '/kotlin/**' exclude '/kotlin/**'
//exclude '/kotlinx/**' exclude '/kotlinx/**'
} }
} }
@ -61,48 +57,45 @@ dependencies {
implementation 'com.jakewharton.timber:timber:4.7.1' implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.github.skoumalcz:teanity:0.3.3' implementation 'com.github.skoumalcz:teanity:0.3.3'
implementation 'com.ncapdevi:frag-nav:3.2.0' implementation 'com.ncapdevi:frag-nav:3.2.0'
implementation 'com.chibatching.kotpref:kotpref:2.8.0'
def vRoom = "2.1.0-alpha05" def vMarkwon = '3.0.1'
implementation "androidx.room:room-rxjava2:${vRoom}" implementation "ru.noties.markwon:core:${vMarkwon}"
implementation "ru.noties.markwon:html:${vMarkwon}"
implementation "ru.noties.markwon:image-svg:${vMarkwon}"
def markwonVersion = '3.0.1' def vLibsu = '2.5.0'
implementation "ru.noties.markwon:core:${markwonVersion}" implementation "com.github.topjohnwu.libsu:core:${vLibsu}"
implementation "ru.noties.markwon:html:${markwonVersion}" implementation "com.github.topjohnwu.libsu:io:${vLibsu}"
implementation "ru.noties.markwon:image-svg:${markwonVersion}"
def libsuVersion = '2.5.0' def vKoin = "2.0.1"
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}" implementation "org.koin:koin-core:${vKoin}"
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}" implementation "org.koin:koin-android:${vKoin}"
implementation "org.koin:koin-androidx-viewmodel:${vKoin}"
def koin = "2.0.0-GA6"
implementation "org.koin:koin-core:${koin}"
implementation "org.koin:koin-android:${koin}"
implementation "org.koin:koin-androidx-viewmodel:${koin}"
def vRetrofit = "2.5.0" def vRetrofit = "2.5.0"
def vOkHttp = "3.12.0"
def vMoshi = "1.8.0"
implementation "com.squareup.retrofit2:retrofit:${vRetrofit}" implementation "com.squareup.retrofit2:retrofit:${vRetrofit}"
implementation "com.squareup.retrofit2:converter-moshi:${vRetrofit}" implementation "com.squareup.retrofit2:converter-moshi:${vRetrofit}"
implementation "com.squareup.retrofit2:adapter-rxjava2:${vRetrofit}" implementation "com.squareup.retrofit2:adapter-rxjava2:${vRetrofit}"
def vOkHttp = "3.12.0"
implementation "com.squareup.okhttp3:okhttp:${vOkHttp}" implementation "com.squareup.okhttp3:okhttp:${vOkHttp}"
implementation "com.squareup.okhttp3:logging-interceptor:${vOkHttp}" implementation "com.squareup.okhttp3:logging-interceptor:${vOkHttp}"
def vMoshi = "1.8.0"
implementation "com.squareup.moshi:moshi:${vMoshi}" implementation "com.squareup.moshi:moshi:${vMoshi}"
implementation "com.squareup.moshi:moshi-kotlin:${vMoshi}"
kapt "com.squareup.moshi:moshi-kotlin-codegen:${vMoshi}" kapt "com.squareup.moshi:moshi-kotlin-codegen:${vMoshi}"
def vRoom = '2.1.0-rc01'
implementation "androidx.room:room-rxjava2:${vRoom}"
kapt "androidx.room:room-compiler:${vRoom}" kapt "androidx.room:room-compiler:${vRoom}"
def vKotpref = "2.8.0"
implementation "com.chibatching.kotpref:kotpref:${vKotpref}"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.browser:browser:1.0.0' implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.preference:preference:1.0.0' implementation 'androidx.preference:preference:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05' implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'androidx.work:work-runtime:2.0.1' implementation 'androidx.work:work-runtime:2.0.1'
implementation 'androidx.transition:transition:1.2.0-alpha01' implementation 'androidx.transition:transition:1.2.0-alpha01'
implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.1.0-alpha06'
} }

View File

@ -54,15 +54,15 @@ class MagiskRepository(
KConfig.UpdateChannel.CUSTOM -> apiRaw.fetchCustomConfig(KConfig.customUpdateChannel) KConfig.UpdateChannel.CUSTOM -> apiRaw.fetchCustomConfig(KConfig.customUpdateChannel)
} }
.doOnSuccess { .doOnSuccess {
Config.remoteMagiskVersionCode = it.magisk.versionCode.toIntOrNull() ?: 0 Config.remoteMagiskVersionCode = it.magisk.versionCode.toIntOrNull() ?: -1
Config.magiskLink = it.magisk.link Config.magiskLink = it.magisk.link
Config.magiskNoteLink = it.magisk.note Config.magiskNoteLink = it.magisk.note
Config.magiskMD5 = it.magisk.hash Config.magiskMD5 = it.magisk.hash
Config.remoteManagerVersionCode = it.app.versionCode.toIntOrNull() ?: 0 Config.remoteManagerVersionCode = it.app.versionCode.toIntOrNull() ?: -1
Config.remoteManagerVersionString = it.app.version Config.remoteManagerVersionString = it.app.version
Config.managerLink = it.app.link Config.managerLink = it.app.link
Config.managerNoteLink = it.app.note Config.managerNoteLink = it.app.note
Config.uninstallerLink = it.uninstaller.link Config.uninstallerLink = it.uninstaller.link
} }

View File

@ -15,7 +15,7 @@ buildscript {
maven { url 'https://kotlin.bintray.com/kotlinx' } maven { url 'https://kotlin.bintray.com/kotlinx' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-beta02' classpath 'com.android.tools.build:gradle:3.5.0-beta03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"