1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-09-20 15:41:36 +02:00
Frost-for-Facebook/app/build.gradle

341 lines
11 KiB
Groovy
Raw Normal View History

2017-05-30 00:05:26 +02:00
apply plugin: 'com.android.application'
2018-11-07 04:46:38 +01:00
apply plugin: 'com.bugsnag.android.gradle'
2017-05-30 00:05:26 +02:00
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
2017-06-29 19:12:18 +02:00
apply plugin: 'kotlin-kapt'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'com.gladed.androidgitversion'
buildscript {
repositories {
jcenter()
2020-03-01 03:37:09 +01:00
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
2020-03-01 03:37:09 +01:00
classpath "com.github.node-gradle:gradle-node-plugin:${Versions.nodeGradle}"
}
}
2020-03-01 03:37:09 +01:00
apply plugin: 'com.github.node-gradle.node'
2017-07-03 04:55:52 +02:00
apply from: '../spotless.gradle'
2019-03-31 04:44:03 +02:00
group = APP_GROUP
2017-05-30 00:05:26 +02:00
android {
compileSdkVersion Versions.targetSdk
2017-05-30 00:05:26 +02:00
2017-07-02 20:57:57 +02:00
androidGitVersion {
v1.4.5 (#174) * Update/kau (#125) * Update logger * Clean imports and bring back reactive libs * Update dependencies and make billing async * Misc (#128) * Update null * Attempt to improve transparent theme backgrounds * Update menu * Move injections to visible method and reduce offset * Update searchview and logging * Clean temp strings and add network states * Move console blacklist to web state * Change some logs to info * Move glide loader to onCreate (#135) * Remove commit number increments (#139) * Fix/misc (#140) * Add canadian locale to toLowerCase * Add try catch to JsAssets * Disable error throwing for bad search subject * Log more throwables quietly * Check internet connection before fetching username * Remove name check in frost notifications * Add activity lifecycle logger * Add rxjava to lib showcase * Move network checker to io thread (#150) * Update dependency * Blank * Feature/jsoup debugger (#152) * Create debugger * Update debugger content * Create debugging logic * Finalize and test debugger * Add reload listener * Fix/pro crash without play store (#155) * Update changelog * Check if iab service exists * Add checker before launching play store request * Separate strings * Enhancement/message notifications (#157) * Map message notifs to the headless html extractor * Update strings * Bring im notifs out of alpha * Update changelog * Remove confirmation dialog (#159) * Separate message notifications and add click intents (#171) * Separate message notifications and add click intent for group notifications * Add comments and finalize * Feature/scroll down on message thread (#172) * Add hook for scroll * Update changelog * Add custom navdrawer layout (#173) * Add faq for auto play * Update changelog * Fix page banner bg (#163)
2017-08-15 05:48:39 +02:00
codeFormat = 'MMNNPPXX'
2018-10-09 03:11:03 +02:00
format = '%tag%%-count%%-commit%'
2017-07-02 20:57:57 +02:00
prefix 'v'
}
2017-05-30 00:05:26 +02:00
defaultConfig {
applicationId "${project.APP_GROUP}.${project.APP_ID.toLowerCase(Locale.CANADA)}"
2019-06-07 20:52:55 +02:00
minSdkVersion kau.Versions.minSdk
targetSdkVersion Versions.targetSdk
2020-03-02 07:55:34 +01:00
versionCode 2040400
// versionCode androidGitVersion.code()
versionName '2.4.4'
// versionName androidGitVersion.name()
2020-02-06 08:32:17 +01:00
2020-03-02 08:47:39 +01:00
if (System.getenv('TRAVIS') != 'true') {
// Verification for F-Droid builds
if (versionCode != androidGitVersion.code()) {
throw new GradleException("Version code mismatch, expected ${androidGitVersion.code()}, got $versionCode")
}
if (versionName != androidGitVersion.name()) {
throw new GradleException("Version name mismatch, expected ${androidGitVersion.name()}, got $versionName")
}
multiDexEnabled true
testInstrumentationRunner "com.pitchedapps.frost.FrostTestRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/src/schemas".toString()]
}
2019-03-06 00:31:47 +01:00
}
}
2017-05-30 00:05:26 +02:00
}
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${project.APP_ID}-${variant.buildType.name}.apk"
2017-05-30 00:05:26 +02:00
}
}
2017-06-02 03:09:43 +02:00
lintOptions {
warningsAsErrors true
v1.4.5 (#174) * Update/kau (#125) * Update logger * Clean imports and bring back reactive libs * Update dependencies and make billing async * Misc (#128) * Update null * Attempt to improve transparent theme backgrounds * Update menu * Move injections to visible method and reduce offset * Update searchview and logging * Clean temp strings and add network states * Move console blacklist to web state * Change some logs to info * Move glide loader to onCreate (#135) * Remove commit number increments (#139) * Fix/misc (#140) * Add canadian locale to toLowerCase * Add try catch to JsAssets * Disable error throwing for bad search subject * Log more throwables quietly * Check internet connection before fetching username * Remove name check in frost notifications * Add activity lifecycle logger * Add rxjava to lib showcase * Move network checker to io thread (#150) * Update dependency * Blank * Feature/jsoup debugger (#152) * Create debugger * Update debugger content * Create debugging logic * Finalize and test debugger * Add reload listener * Fix/pro crash without play store (#155) * Update changelog * Check if iab service exists * Add checker before launching play store request * Separate strings * Enhancement/message notifications (#157) * Map message notifs to the headless html extractor * Update strings * Bring im notifs out of alpha * Update changelog * Remove confirmation dialog (#159) * Separate message notifications and add click intents (#171) * Separate message notifications and add click intent for group notifications * Add comments and finalize * Feature/scroll down on message thread (#172) * Add hook for scroll * Update changelog * Add custom navdrawer layout (#173) * Add faq for auto play * Update changelog * Fix page banner bg (#163)
2017-08-15 05:48:39 +02:00
disable 'TrustAllX509TrustManager',
'UnusedResources',
'ContentDescription',
'RtlSymmetry',
'MissingTranslation'
xmlReport false
textReport true
textOutput 'stdout'
}
2020-03-01 03:37:09 +01:00
buildFeatures {
viewBinding = true
}
def testKeystoreFile = file('../files/test.keystore')
def testPropFile = file('../files/test.properties')
def withTestSigning = testKeystoreFile.exists() && testPropFile.exists()
def releaseKeystoreFile = file('../files/release.keystore')
def releasePropFile = file('../files/release.properties')
def withReleaseSigning = releaseKeystoreFile.exists() && releasePropFile.exists()
2017-06-02 03:09:43 +02:00
signingConfigs {
2017-07-03 02:24:17 +02:00
debug {
storeFile file("../files/debug.keystore")
storePassword "debugKey"
keyAlias "debugKey"
keyPassword "debugKey"
}
if (withTestSigning) {
def testProps = new Properties()
testPropFile.withInputStream { testProps.load(it) }
test {
storeFile testKeystoreFile
storePassword testProps.getProperty('storePassword')
keyAlias testProps.getProperty('keyAlias')
keyPassword testProps.getProperty('keyPassword')
}
2017-06-02 03:09:43 +02:00
}
if (withReleaseSigning) {
def releaseProps = new Properties()
releasePropFile.withInputStream { releaseProps.load(it) }
release {
storeFile releaseKeystoreFile
storePassword releaseProps.getProperty('storePassword')
keyAlias releaseProps.getProperty('keyAlias')
keyPassword releaseProps.getProperty('keyPassword')
}
}
2017-06-02 03:09:43 +02:00
}
def compilerArgs = ["-Xuse-experimental=kotlin.Experimental" /*, "-XXLanguage:+InlineClasses"*/]
2017-05-30 00:05:26 +02:00
buildTypes {
2017-06-02 03:09:43 +02:00
debug {
2017-06-04 07:24:19 +02:00
minifyEnabled false
shrinkResources false
2017-06-02 03:09:43 +02:00
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
signingConfig signingConfigs.debug
resValue "string", "frost_name", "Frost Debug"
2017-06-21 00:50:08 +02:00
resValue "string", "frost_web", "Frost Web Debug"
ext.enableBugsnag = false
kotlinOptions.freeCompilerArgs += compilerArgs
2017-06-02 03:09:43 +02:00
}
releaseTest {
2017-06-04 08:03:23 +02:00
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2017-06-02 03:09:43 +02:00
applicationIdSuffix ".test"
versionNameSuffix "-test"
if (withTestSigning) signingConfig signingConfigs.test
resValue "string", "frost_name", "Frost Test"
2017-06-21 00:50:08 +02:00
resValue "string", "frost_web", "Frost Web Test"
2017-06-02 03:09:43 +02:00
}
2017-05-30 00:05:26 +02:00
release {
2017-07-01 07:50:58 +02:00
minifyEnabled true
shrinkResources true
if (withReleaseSigning) signingConfig signingConfigs.release
2017-05-30 00:05:26 +02:00
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "frost_name", "Frost"
2017-06-21 00:50:08 +02:00
resValue "string", "frost_web", "Frost Web"
2017-05-30 00:05:26 +02:00
}
}
2017-06-02 03:09:43 +02:00
2017-05-30 00:05:26 +02:00
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
2017-06-01 02:11:46 +02:00
test.java.srcDirs += 'src/test/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
main.assets.srcDirs += ['src/web/assets']
2017-05-30 00:05:26 +02:00
}
2017-06-13 01:51:27 +02:00
packagingOptions {
2019-06-07 21:43:22 +02:00
pickFirst 'META-INF/core_release.kotlin_module'
2017-06-13 01:51:27 +02:00
pickFirst 'META-INF/library_release.kotlin_module'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Translations (#1611) * New translations strings.xml (Afrikaans) * New translations strings_pref_appearance.xml (Japanese) * New translations strings_pref_appearance.xml (Hebrew) * New translations strings_pref_behaviour.xml (Catalan) * New translations strings_pref_behaviour.xml (Finnish) * New translations strings_pref_behaviour.xml (Afrikaans) * New translations strings_pref_appearance.xml (Tamil) * New translations strings_play_store.xml (Japanese) * New translations strings_play_store.xml (Hebrew) * New translations strings_pref_appearance.xml (Finnish) * New translations strings_pref_appearance.xml (Catalan) * New translations strings_pref_appearance.xml (Afrikaans) * New translations strings_play_store.xml (Tamil) * New translations strings_play_store.xml (Finnish) * New translations strings_pref_debug.xml (Tamil) * New translations strings_pref_debug.xml (Hebrew) * New translations strings_pref_experimental.xml (Greek) * New translations strings_pref_experimental.xml (Finnish) * New translations strings_pref_experimental.xml (Catalan) * New translations strings_pref_experimental.xml (Afrikaans) * New translations strings_pref_behaviour.xml (Japanese) * New translations strings_pref_behaviour.xml (Hebrew) * New translations strings_pref_behaviour.xml (Spanish) * New translations strings_pref_debug.xml (Finnish) * New translations strings_pref_behaviour.xml (Tamil) * New translations strings_pref_debug.xml (Catalan) * New translations strings_pref_debug.xml (Afrikaans) * New translations strings_pref_debug.xml (Japanese) * New translations strings_download.xml (Japanese) * New translations strings_download.xml (Hebrew) * New translations strings_download.xml (Finnish) * New translations strings_download.xml (Catalan) * New translations strings_download.xml (Tamil) * New translations strings_errors.xml (Afrikaans) * New translations strings.xml (Finnish) * New translations strings.xml (Hebrew) * New translations strings.xml (Catalan) * New translations strings_download.xml (Afrikaans) * New translations strings.xml (Tamil) * New translations strings_errors.xml (Catalan) * New translations strings.xml (Japanese) * New translations strings_intro.xml (Japanese) * New translations strings_intro.xml (Hebrew) * New translations strings_intro.xml (Finnish) * New translations strings_play_store.xml (Afrikaans) * New translations strings_play_store.xml (Catalan) * New translations strings_intro.xml (Tamil) * New translations strings_errors.xml (Hebrew) * New translations strings_errors.xml (Japanese) * New translations strings_errors.xml (Finnish) * New translations strings_errors.xml (Tamil) * New translations strings_intro.xml (Afrikaans) * New translations strings_intro.xml (Catalan) * New translations strings_preferences.xml (Tamil) * New translations strings_web_context.xml (Afrikaans) * New translations strings_web_context.xml (Catalan) * New translations strings_web_context.xml (Finnish) * New translations strings_preferences.xml (Catalan) * New translations strings_pref_notifications.xml (Tamil) * New translations strings_preferences.xml (Afrikaans) * New translations strings_preferences.xml (Japanese) * New translations strings_preferences.xml (Finnish) * New translations strings_preferences.xml (Greek) * New translations strings_preferences.xml (Hebrew) * New translations strings_pref_security.xml (Greek) * New translations strings_pref_security.xml (Hebrew) * New translations strings_pref_security.xml (Hungarian) * New translations strings_pref_security.xml (Indonesian) * New translations strings_pref_security.xml (Italian) * New translations strings_pref_security.xml (Japanese) * New translations strings_pref_security.xml (Norwegian) * New translations strings_pref_security.xml (Dutch) * New translations strings_pref_security.xml (Romanian) * New translations strings_pref_security.xml (Serbian (Cyrillic)) * New translations strings_pref_security.xml (Swedish) * New translations strings_pref_security.xml (Tagalog) * New translations strings_pref_security.xml (Tamil) * New translations strings_pref_security.xml (Thai) * New translations strings_pref_security.xml (Turkish) * New translations strings_pref_security.xml (Finnish) * New translations strings_pref_security.xml (Danish) * New translations strings_web_context.xml (Hebrew) * New translations strings_web_context.xml (Japanese) * New translations strings_pref_security.xml (Czech) * New translations strings_web_context.xml (Tamil) * New translations strings_pref_security.xml (Afrikaans) * New translations strings_pref_security.xml (Catalan) * New translations strings_pref_security.xml (Chinese Simplified) * New translations strings_pref_feed.xml (Finnish) * New translations strings_pref_feed.xml (Hebrew) * New translations strings_pref_feed.xml (Japanese) * New translations strings_pref_feed.xml (Tamil) * New translations strings_pref_experimental.xml (Hebrew) * New translations strings_pref_experimental.xml (Japanese) * New translations strings_pref_experimental.xml (Tamil) * New translations strings_pref_feed.xml (Afrikaans) * New translations strings_pref_feed.xml (Catalan) * New translations strings_pref_networks.xml (Afrikaans) * New translations strings_pref_notifications.xml (Finnish) * New translations strings_pref_notifications.xml (Afrikaans) * New translations strings_pref_notifications.xml (Catalan) * New translations strings_pref_networks.xml (Tamil) * New translations strings_pref_notifications.xml (Hebrew) * New translations strings_pref_notifications.xml (Japanese) * New translations strings_pref_networks.xml (Catalan) * New translations strings_pref_networks.xml (Finnish) * New translations strings_pref_networks.xml (Hebrew) * New translations strings_pref_networks.xml (Japanese) * New translations strings_pref_security.xml (Vietnamese) * Update gradle * Delete blank files * New translations strings_pref_behaviour.xml (Spanish) * Set jvm target in kotlin * Update kau
2019-12-31 09:03:23 +01:00
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
testOptions.unitTests {
includeAndroidResources = true
// Don't throw runtime exceptions for android calls that are not mocked
returnDefaultValues = true
// Always show the result of every unit test, even if it passes.
all {
testLogging {
events 'passed', 'skipped', 'failed', 'standardError'
}
}
}
2018-12-29 21:10:11 +01:00
androidExtensions {
experimental = true
2020-01-20 06:26:02 +01:00
features = ["parcelize"]
2018-12-29 21:10:11 +01:00
}
2017-05-30 00:05:26 +02:00
}
node {
2020-03-01 03:37:09 +01:00
version = '13.8.0'
npmVersion = '6.13.7'
download = true
nodeModulesDir = file("${project.projectDir}/src/web")
}
task npmCi(type: NpmTask) {
dependsOn npmSetup
npmCommand = ["ci"]
}
task frostWebGen(type: NpmTask) {
dependsOn npmCi
2019-07-03 09:55:33 +02:00
group 'build'
description 'Generate Frost web assets'
args = ['run', 'compile']
}
2019-07-03 09:12:25 +02:00
preBuild.dependsOn(frostWebGen)
2017-06-26 06:11:15 +02:00
repositories {
google()
2017-06-26 06:11:15 +02:00
jcenter()
maven { url "https://jitpack.io" }
}
2017-05-30 00:05:26 +02:00
dependencies {
2019-06-07 20:52:55 +02:00
androidTestImplementation kau.Dependencies.kotlinTest
androidTestImplementation kau.Dependencies.espresso
androidTestImplementation kau.Dependencies.testRules
androidTestImplementation kau.Dependencies.testRunner
2019-06-08 08:10:02 +02:00
androidTestImplementation kau.Dependencies.kotlinReflect
2019-06-07 20:52:55 +02:00
testImplementation kau.Dependencies.kotlinTest
2019-06-08 08:10:02 +02:00
testImplementation kau.Dependencies.kotlinReflect
2019-06-07 20:52:55 +02:00
testImplementation kau.Dependencies.junit
2019-06-08 08:10:02 +02:00
implementation kau.Dependencies.kotlin
//noinspection GradleDependency
implementation kau.Dependencies.kau('core', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('core-ui', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('adapter', KAU)
//noinspection GradleDependency
2019-07-02 08:32:45 +02:00
implementation kau.Dependencies.kau('fastadapter', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('about', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('colorpicker', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('mediapicker', KAU)
//noinspection GradleDependency
implementation kau.Dependencies.kau('kpref-activity', KAU)
v1.4.5 (#174) * Update/kau (#125) * Update logger * Clean imports and bring back reactive libs * Update dependencies and make billing async * Misc (#128) * Update null * Attempt to improve transparent theme backgrounds * Update menu * Move injections to visible method and reduce offset * Update searchview and logging * Clean temp strings and add network states * Move console blacklist to web state * Change some logs to info * Move glide loader to onCreate (#135) * Remove commit number increments (#139) * Fix/misc (#140) * Add canadian locale to toLowerCase * Add try catch to JsAssets * Disable error throwing for bad search subject * Log more throwables quietly * Check internet connection before fetching username * Remove name check in frost notifications * Add activity lifecycle logger * Add rxjava to lib showcase * Move network checker to io thread (#150) * Update dependency * Blank * Feature/jsoup debugger (#152) * Create debugger * Update debugger content * Create debugging logic * Finalize and test debugger * Add reload listener * Fix/pro crash without play store (#155) * Update changelog * Check if iab service exists * Add checker before launching play store request * Separate strings * Enhancement/message notifications (#157) * Map message notifs to the headless html extractor * Update strings * Bring im notifs out of alpha * Update changelog * Remove confirmation dialog (#159) * Separate message notifications and add click intents (#171) * Separate message notifications and add click intent for group notifications * Add comments and finalize * Feature/scroll down on message thread (#172) * Add hook for scroll * Update changelog * Add custom navdrawer layout (#173) * Add faq for auto play * Update changelog * Fix page banner bg (#163)
2017-08-15 05:48:39 +02:00
//noinspection GradleDependency
implementation kau.Dependencies.kau('searchview', KAU)
implementation kau.Dependencies.coreKtx
implementation kau.Dependencies.swipeRefreshLayout
2018-12-26 04:27:23 +01:00
2019-06-08 08:10:02 +02:00
implementation "androidx.biometric:biometric:${Versions.andxBiometric}"
2019-04-22 02:20:21 +02:00
2020-02-18 09:00:14 +01:00
implementation kau.Dependencies.koin
testImplementation kau.Dependencies.koinTest
androidTestImplementation kau.Dependencies.koinTest
2019-06-08 08:10:02 +02:00
// androidTestImplementation "io.mockk:mockk:${Versions.mockk}"
2019-06-08 08:10:02 +02:00
implementation kau.Dependencies.coroutines
2018-12-21 05:12:41 +01:00
2019-06-08 08:10:02 +02:00
implementation "org.apache.commons:commons-text:${Versions.apacheCommonsText}"
2019-06-08 08:10:02 +02:00
implementation "com.devbrackets.android:exomedia:${Versions.exoMedia}"
2019-09-23 07:36:16 +02:00
implementation kau.Dependencies.fastAdapter("diff")
implementation kau.Dependencies.fastAdapter("drag")
implementation kau.Dependencies.fastAdapter("expandable")
//noinspection GradleDependency
2019-06-08 08:10:02 +02:00
implementation kau.Dependencies.glide
//noinspection GradleDependency
2019-06-08 08:10:02 +02:00
kapt kau.Dependencies.glideKapt
2020-03-01 07:26:01 +01:00
debugImplementation kau.Dependencies.leakCanary
2017-05-30 00:05:26 +02:00
//Icons
2019-06-08 08:10:02 +02:00
implementation kau.Dependencies.iconicsMaterial
implementation kau.Dependencies.iconicsCommunity
2017-05-30 00:05:26 +02:00
2019-12-30 21:18:46 +01:00
implementation kau.Dependencies.materialDialog("input")
2019-06-08 08:10:02 +02:00
implementation "org.jsoup:jsoup:${Versions.jsoup}"
2019-06-08 08:10:02 +02:00
implementation "com.squareup.okhttp3:okhttp:${Versions.okhttp}"
implementation "com.squareup.okhttp3:logging-interceptor:${Versions.okhttp}"
testImplementation "com.squareup.okhttp3:mockwebserver:${Versions.okhttp}"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:${Versions.okhttp}"
2019-06-08 08:10:02 +02:00
implementation kau.Dependencies.bugsnag
2019-06-08 08:10:02 +02:00
implementation "com.davemorrissey.labs:subsampling-scale-image-view:${Versions.scaleImageView}"
2019-06-08 08:10:02 +02:00
implementation "androidx.room:room-ktx:${Versions.room}"
implementation "androidx.room:room-runtime:${Versions.room}"
kapt "androidx.room:room-compiler:${Versions.room}"
testImplementation "androidx.room:room-testing:${Versions.room}"
2019-03-06 00:31:47 +01:00
}
def kotlinResolutions = ['kotlin-reflect',
'kotlin-stdlib',
'kotlin-stdlib-jdk7',
'kotlin-stdlib-jdk8',
'kotlin-test',
'kotlin-test-junit4',
'kotlin-test-junit5']
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin' && requested.name in kotlinResolutions) {
2019-06-08 08:10:02 +02:00
details.useVersion kau.Versions.kotlin
}
}
}
2020-03-02 08:22:58 +01:00
// Validates code and generates apk
// TODO order tasks; though technically it doesn't matter
task createGithubReleaseApk {
dependsOn 'spotlessCheck'
dependsOn 'lintRelease'
dependsOn 'testReleaseUnitTest'
dependsOn 'connectedAndroidTest'
dependsOn 'assembleRelease'
}
apply plugin: 'com.bugsnag.android.gradle'