mirror of
https://gitlab.shinice.net/pixeldroid/PixelDroid
synced 2024-12-25 06:23:58 +01:00
8fb5074f84
* first draft of dark mode, still needs some work * changed dark mode colors * fixed more buttons in dark mode * Ran linter and fixed a few things * mades things more kotlin-like * added night mode selector in settings, but doesn't seem to work * WIP Theme settings * Fix callback not getting called (not registered) * added theme test * removed useless strings * Fix dark mode not being applied * Our app isn't called ThemedApplication and fixed fix * changed default theme for API versions lower than 29 * WIP splashscreen nightmode * Added custom splashscreen * added night mode for splashscreen * removed useless night values * adapted icons for dark mode * fixed light mode colors * fixed a few light mode color bugs * fixed bad login button * fixed search tabs color * fixed weird text input in post creation * removed hardcoded strings in settings test * removed unnecessary margin in login activity * replace getIntrumentation.context with getInstrumentation.targetContext in settings test Co-authored-by: Matthieu De Beule <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
151 lines
5.4 KiB
Groovy
151 lines
5.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'jacoco'
|
|
|
|
android {
|
|
|
|
compileSdkVersion 29
|
|
buildToolsVersion "29.0.3"
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
defaultConfig {
|
|
applicationId "com.h.pixeldroid"
|
|
minSdkVersion 23
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
|
}
|
|
lintOptions{
|
|
disable 'MissingTranslation'
|
|
}
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/java'
|
|
test.java.srcDirs += 'src/test/java'
|
|
androidTest.java.srcDirs += 'src/androidTest/java'
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
debug {
|
|
testCoverageEnabled true
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
testOptions {
|
|
animationsDisabled true
|
|
|
|
}
|
|
|
|
apply plugin: 'kotlin-kapt'
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'androidx.core:core-ktx:1.2.0'
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
implementation 'androidx.navigation:navigation-fragment:2.2.2'
|
|
implementation 'androidx.navigation:navigation-ui:2.2.2'
|
|
implementation 'com.squareup.okhttp3:okhttp:4.6.0'
|
|
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
|
|
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.8.1'
|
|
implementation 'io.reactivex.rxjava2:rxjava:2.2.16'
|
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
|
implementation "androidx.browser:browser:1.2.0"
|
|
implementation 'com.google.android.material:material:1.1.0'
|
|
implementation 'com.github.connyduck:sparkbutton:3.0.0'
|
|
|
|
def room_version = "2.2.5"
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
testImplementation "androidx.room:room-testing:$room_version"
|
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
|
|
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
|
|
|
|
implementation 'info.androidhive:imagefilters:1.0.7'
|
|
|
|
implementation("com.github.bumptech.glide:glide:4.11.0") {
|
|
exclude group: "com.android.support"
|
|
}
|
|
|
|
implementation "com.github.bumptech.glide:okhttp-integration:4.11.0"
|
|
implementation("com.github.bumptech.glide:recyclerview-integration:4.11.0") {
|
|
// Excludes the support library because it's already included by Glide.
|
|
transitive = false
|
|
}
|
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
testImplementation "com.github.tomakehurst:wiremock-jre8:2.26.3"
|
|
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
|
|
testImplementation 'junit:junit:4.13'
|
|
|
|
androidTestImplementation('com.squareup.okhttp3:mockwebserver:4.6.0')
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
|
|
implementation 'androidx.paging:paging-runtime-ktx:2.1.2'
|
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0'
|
|
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
|
|
|
def fragment_version = '1.2.4'
|
|
debugImplementation "androidx.fragment:fragment-testing:$fragment_version"
|
|
|
|
implementation 'com.karumi:dexter:6.1.2'
|
|
|
|
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
|
|
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
jacoco.includeNoLocationClasses = true
|
|
jacoco.excludes = ['jdk.internal.*']
|
|
}
|
|
|
|
|
|
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
|
|
|
|
reports {
|
|
xml.enabled = true
|
|
html.enabled = true
|
|
}
|
|
|
|
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
|
|
def kotlinDebugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: fileFilter)
|
|
def mainSrc = "$project.projectDir/src/main/java"
|
|
getSourceDirectories().from(files([mainSrc]))
|
|
getClassDirectories().from(files([kotlinDebugTree]))
|
|
getExecutionData().from(fileTree(dir: project.buildDir, includes: [
|
|
|
|
'outputs/code_coverage/debugAndroidTest/connected/*coverage.ec',
|
|
|
|
'jacoco/testDebugUnitTest.exec'
|
|
|
|
]))
|
|
}
|