
Add a tab menu on the bottom of the screen that can switch between all fragments on the ViewPager.
91 lines
No EOL
2.2 KiB
Groovy
91 lines
No EOL
2.2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: "androidx.navigation.safeargs"
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
buildToolsVersion "30.0.1"
|
|
|
|
defaultConfig {
|
|
applicationId "org.oxycblt.auxio"
|
|
minSdkVersion 24
|
|
targetSdkVersion 30
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
buildFeatures {
|
|
dataBinding true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
dataBinding true
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
ktlint
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
|
|
// Kotlin
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
// --- SUPPORT ---
|
|
implementation 'androidx.core:core-ktx:1.3.1'
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
|
|
|
|
// Navigation
|
|
def navigation_version = "2.3.0"
|
|
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
|
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
|
|
|
|
// Lifecycle
|
|
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
|
|
|
// Viewpager
|
|
implementation 'androidx.viewpager2:viewpager2:1.0.0'
|
|
|
|
// --- THIRD PARTY ---
|
|
// Image loading
|
|
implementation 'io.coil-kt:coil:0.12.0'
|
|
|
|
// Material
|
|
implementation 'com.google.android.material:material:1.3.0-alpha02'
|
|
|
|
// Lint
|
|
ktlint "com.pinterest:ktlint:0.37.2"
|
|
}
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
description = "Check Kotlin code style."
|
|
main = "com.pinterest.ktlint.Main"
|
|
classpath = configurations.ktlint
|
|
|
|
args "src/**/*.kt"
|
|
}
|
|
check.dependsOn ktlint
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
description = "Fix Kotlin code style deviations."
|
|
main = "com.pinterest.ktlint.Main"
|
|
classpath = configurations.ktlint
|
|
|
|
args "-F", "src/**/*.kt"
|
|
} |