mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-05-10 15:33:09 -05:00
closes #1578 closes #1583 closes #1591 Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1582 Co-authored-by: M M Arif <mmarif@swatian.com> Co-committed-by: M M Arif <mmarif@swatian.com>
166 lines
4.5 KiB
Groovy
166 lines
4.5 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.spotless)
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
android {
|
|
defaultConfig {
|
|
applicationId = "org.mian.gitnex"
|
|
minSdkVersion libs.versions.minSdk.get() as int
|
|
targetSdkVersion libs.versions.targetSdk.get() as int
|
|
versionCode = libs.versions.versionCode.get() as int
|
|
versionName = libs.versions.versionName.get()
|
|
multiDexEnabled = true
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
compileSdk = libs.versions.compileSdk.get() as int
|
|
vectorDrawables.useSupportLibrary = true
|
|
}
|
|
|
|
compileSdk = libs.versions.compileSdk.get() as int
|
|
|
|
flavorDimensions = ["default"]
|
|
productFlavors {
|
|
free {
|
|
applicationId "org.mian.gitnex"
|
|
}
|
|
pro {
|
|
applicationId "org.mian.gitnex.pro"
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
buildConfig = true
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
shrinkResources = false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
}
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled = true
|
|
sourceCompatibility JavaVersion.toVersion(libs.versions.javaVersion.get())
|
|
targetCompatibility JavaVersion.toVersion(libs.versions.javaVersion.get())
|
|
}
|
|
|
|
lint {
|
|
abortOnError = false
|
|
}
|
|
|
|
namespace = 'org.mian.gitnex'
|
|
|
|
packagingOptions {
|
|
resources {
|
|
excludes += [
|
|
'META-INF/versions/9/OSGI-INF/MANIFEST.MF',
|
|
'META-INF/DEPENDENCIES',
|
|
'META-INF/LICENSE',
|
|
'META-INF/LICENSE.txt',
|
|
'META-INF/NOTICE',
|
|
'META-INF/NOTICE.txt'
|
|
]
|
|
pickFirsts += [
|
|
'META-INF/versions/9/OSGI-INF/MANIFEST.MF'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
cleanedAnnotations
|
|
compile.exclude group: 'org.jetbrains', module: 'annotations'
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
// AndroidX
|
|
implementation libs.androidx.appcompat
|
|
implementation libs.androidx.material
|
|
implementation libs.androidx.compose.material3
|
|
implementation libs.androidx.compose.material3.window
|
|
implementation libs.androidx.viewpager2
|
|
implementation libs.androidx.constraintlayout
|
|
implementation libs.androidx.legacy.support
|
|
implementation libs.androidx.navigation.fragment
|
|
implementation libs.androidx.navigation.ui
|
|
implementation libs.androidx.lifecycle.viewmodel
|
|
implementation libs.androidx.room.runtime
|
|
annotationProcessor libs.androidx.room.compiler
|
|
implementation libs.androidx.work
|
|
implementation libs.androidx.biometric
|
|
implementation libs.androidx.browser
|
|
implementation libs.androidx.flexbox
|
|
|
|
// Testing
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.androidx.test.junit
|
|
androidTestImplementation libs.androidx.test.espresso
|
|
|
|
// Networking
|
|
implementation libs.okhttp
|
|
implementation libs.retrofit
|
|
implementation libs.retrofit.converter.gson
|
|
implementation libs.retrofit.converter.scalars
|
|
implementation libs.okhttp.logging
|
|
implementation libs.gson
|
|
|
|
// Utils
|
|
implementation libs.androidsvg
|
|
implementation libs.android.gif.drawable
|
|
implementation libs.guava
|
|
implementation libs.commons.io
|
|
implementation libs.commons.lang3
|
|
implementation libs.photoview
|
|
implementation libs.urlbuilder
|
|
implementation libs.stormpot
|
|
implementation libs.codeview
|
|
|
|
// Markwon bundle
|
|
implementation libs.bundles.markwon
|
|
|
|
// Glide
|
|
implementation libs.glide
|
|
implementation libs.glide.annotations
|
|
implementation libs.glide.okhttp
|
|
annotationProcessor libs.glide.compiler
|
|
|
|
// ACRA bundle
|
|
implementation libs.bundles.acra
|
|
|
|
// Desugaring
|
|
coreLibraryDesugaring libs.desugar.jdk.libs
|
|
|
|
constraints {
|
|
it.implementation(libs.kotlin.stdlib.jdk7)
|
|
it.implementation(libs.kotlin.stdlib.jdk8)
|
|
}
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
target 'src/**/*.java'
|
|
|
|
importOrder('android', 'androidx', 'com', 'junit', 'net', 'org', 'java', 'javax', '', '\\#')
|
|
|
|
removeUnusedImports()
|
|
googleJavaFormat().aosp()
|
|
leadingSpacesToTabs()
|
|
formatAnnotations()
|
|
}
|
|
}
|