2017-07-25 04:37:23 +00:00
|
|
|
apply plugin: 'com.android.application'
|
2019-05-16 03:38:29 +00:00
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
apply plugin: 'kotlin-kapt'
|
2019-03-20 01:50:01 +00:00
|
|
|
apply plugin: 'io.fabric'
|
2019-08-02 03:00:29 +00:00
|
|
|
apply plugin: 'jacoco'
|
2018-10-16 01:41:33 +00:00
|
|
|
|
2018-09-05 00:45:01 +00:00
|
|
|
def keystoreProperties = new Properties()
|
2019-08-02 03:00:29 +00:00
|
|
|
try {
|
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
} catch (FileNotFoundException e) {
|
|
|
|
logger.warn("Unable to load keystore properties. Automatic signing won't be available")
|
|
|
|
keystoreProperties['keyAlias'] = ""
|
|
|
|
keystoreProperties['keyPassword'] = ""
|
|
|
|
keystoreProperties['storeFile'] = File.createTempFile("temp", ".tmp").absolutePath
|
|
|
|
keystoreProperties['storePassword'] = ""
|
|
|
|
}
|
|
|
|
|
2018-09-05 00:45:01 +00:00
|
|
|
|
2017-07-25 04:37:23 +00:00
|
|
|
android {
|
2017-08-23 17:24:48 +00:00
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
|
|
|
|
}
|
2017-07-27 17:43:55 +00:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE-LGPL-2.1.txt'
|
|
|
|
exclude 'META-INF/LICENSE-LGPL-3.txt'
|
|
|
|
exclude 'META-INF/LICENSE-W3C-TEST'
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
}
|
2019-08-05 04:12:11 +00:00
|
|
|
compileSdkVersion 28
|
2018-10-16 12:30:28 +00:00
|
|
|
buildToolsVersion '28.0.3'
|
2017-08-07 22:54:18 +00:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2017-07-25 04:37:23 +00:00
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.wbrawner.simplemarkdown"
|
2019-05-18 15:49:03 +00:00
|
|
|
minSdkVersion 21
|
2019-08-05 04:12:11 +00:00
|
|
|
targetSdkVersion 28
|
2019-05-19 21:40:42 +00:00
|
|
|
versionCode 20
|
|
|
|
versionName "0.7.0"
|
2019-05-16 03:38:29 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2019-05-18 06:29:15 +00:00
|
|
|
buildConfigField "boolean", "ENABLE_CUSTOM_CSS", "false"
|
2017-07-25 04:37:23 +00:00
|
|
|
}
|
2018-09-05 00:45:01 +00:00
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
storeFile file(keystoreProperties['storeFile'])
|
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
}
|
|
|
|
}
|
2017-07-25 04:37:23 +00:00
|
|
|
buildTypes {
|
2019-08-02 03:00:29 +00:00
|
|
|
debug {
|
|
|
|
testCoverageEnabled true
|
|
|
|
}
|
2017-07-25 04:37:23 +00:00
|
|
|
release {
|
2017-12-24 01:24:55 +00:00
|
|
|
minifyEnabled true
|
2017-07-25 04:37:23 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
2018-09-05 00:45:01 +00:00
|
|
|
signingConfig signingConfigs.release
|
2019-05-18 01:17:14 +00:00
|
|
|
buildConfigField "boolean", "ENABLE_CUSTOM_CSS", "false"
|
2017-07-25 04:37:23 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-29 17:25:30 +00:00
|
|
|
dexOptions {
|
|
|
|
jumboMode true
|
|
|
|
}
|
2018-01-27 22:51:45 +00:00
|
|
|
testOptions {
|
|
|
|
unitTests {
|
|
|
|
includeAndroidResources = true
|
|
|
|
}
|
|
|
|
}
|
2017-07-25 04:37:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-12-24 01:24:55 +00:00
|
|
|
testImplementation 'junit:junit:4.12'
|
2019-03-20 01:50:01 +00:00
|
|
|
testImplementation 'org.robolectric:robolectric:4.2'
|
2018-09-05 00:45:01 +00:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2019-05-16 03:38:29 +00:00
|
|
|
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
|
2017-12-24 01:24:55 +00:00
|
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
|
|
})
|
2019-08-05 01:47:23 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
|
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
2019-05-16 03:38:29 +00:00
|
|
|
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
2019-08-05 01:47:23 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
2019-05-16 03:38:29 +00:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
|
|
implementation 'com.google.android.material:material:1.0.0'
|
|
|
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
2017-12-24 01:24:55 +00:00
|
|
|
implementation 'com.commonsware.cwac:anddown:0.3.0'
|
2019-05-18 01:17:14 +00:00
|
|
|
implementation 'com.google.dagger:dagger:2.22.1'
|
|
|
|
annotationProcessor 'com.google.dagger:dagger-compiler:2.22.1'
|
|
|
|
kapt 'com.google.dagger:dagger-android-processor:2.22.1'
|
|
|
|
kapt 'com.google.dagger:dagger-compiler:2.22.1'
|
2019-08-05 01:47:23 +00:00
|
|
|
implementation 'com.google.firebase:firebase-core:17.0.1'
|
2019-02-10 19:12:51 +00:00
|
|
|
implementation 'com.android.billingclient:billing:1.2'
|
2019-08-05 01:47:23 +00:00
|
|
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
2019-05-18 15:49:03 +00:00
|
|
|
implementation "androidx.core:core-ktx:1.0.2"
|
2019-05-16 03:38:29 +00:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2019-08-17 18:23:26 +00:00
|
|
|
def coroutines_version = "1.3.0-RC2"
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
2019-08-19 01:56:21 +00:00
|
|
|
|
|
|
|
def lifecycle_version = "2.0.0"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
|
|
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
|
2019-08-02 03:00:29 +00:00
|
|
|
implementation 'eu.crydee:syllable-counter:4.0.2'
|
2017-07-25 04:37:23 +00:00
|
|
|
}
|
2019-02-10 19:12:51 +00:00
|
|
|
|
|
|
|
apply plugin: 'com.google.gms.google-services'
|
2019-05-16 03:38:29 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2019-08-02 03:00:29 +00:00
|
|
|
|
|
|
|
jacoco {
|
|
|
|
toolVersion = '0.8.0'
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
jacoco.includeNoLocationClasses = true
|
|
|
|
}
|
|
|
|
|
|
|
|
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {
|
|
|
|
reports {
|
|
|
|
xml.enabled = true
|
|
|
|
html.enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
def fileFilter = [ '**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*' ]
|
|
|
|
def javaDebugTree = fileTree(dir: "$project.buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes", excludes: fileFilter)
|
|
|
|
def kotlinDebugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: fileFilter)
|
|
|
|
def mainSrc = "$project.projectDir/src/main/java"
|
|
|
|
|
|
|
|
sourceDirectories = files([mainSrc])
|
|
|
|
classDirectories = files([javaDebugTree, kotlinDebugTree])
|
|
|
|
executionData = fileTree(dir: project.buildDir, includes: [
|
|
|
|
'jacoco/testDebugUnitTest.exec', 'outputs/code-coverage/connected/*coverage.ec'
|
|
|
|
])
|
|
|
|
}
|