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

331 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()
}
dependencies {
classpath "com.moowork.gradle:gradle-node-plugin:${Versions.nodeGradle}"
}
}
apply plugin: com.moowork.gradle.node.NodePlugin
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
2019-06-07 20:52:55 +02:00
buildToolsVersion kau.Versions.buildTools
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
2017-07-02 19:36:38 +02:00
versionCode androidGitVersion.code()
versionName androidGitVersion.name()
2017-05-30 04:47:52 +02:00
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2019-03-06 00:31:47 +01:00
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/src/schemas".toString()]
}
}
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'
}
dataBinding {
enabled = 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
}
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
}
2017-05-30 00:05:26 +02:00
}
node {
2019-07-03 09:32:12 +02:00
version = '12.4.0'
npmVersion = '6.9.0'
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 {
implementation 'androidx.exifinterface:exifinterface:1.0.0'
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
2019-06-08 08:10:02 +02:00
implementation "org.koin:koin-android:${Versions.koin}"
testImplementation "org.koin:koin-test:${Versions.koin}"
androidTestImplementation "org.koin:koin-test:${Versions.koin}"
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
2017-08-30 20:11:16 +02:00
//noinspection GradleDependency
2019-06-08 08:10:02 +02:00
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}"
2017-08-30 20:11:16 +02:00
//noinspection GradleDependency
2019-06-08 08:10:02 +02:00
releaseTestImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}"
2017-08-30 20:11:16 +02:00
//noinspection GradleDependency
2019-06-08 08:10:02 +02:00
debugImplementation "com.squareup.leakcanary:leakcanary-android:${Versions.leakCanary}"
// testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.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-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 "co.zsmb:materialdrawer-kt:${Versions.materialDrawerKt}"
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
}
// Validates code and generates apk
task createGithubReleaseApk(type: GradleBuild) {
tasks = ['spotlessCheck',
'lintRelease',
'testReleaseUnitTest',
'connectedAndroidTest',
'assembleRelease']
}
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
}
}
}
apply plugin: 'com.bugsnag.android.gradle'