Files
AndroidIDE/app/build.gradle.kts
T
Akash Yadav 5e83554404 fix(logger): use logback-core from logback-android
This change is required because the bytecode transformations performed by AndroidIDE's Desugar Plugin does not work on androidTest classes for some reason. As a result, we use a patched version of logback-core and replace the dependency of logback-classic to use our own.
2024-07-20 19:04:14 +05:30

164 lines
4.8 KiB
Kotlin
Executable File

@file:Suppress("UnstableApiUsage")
import com.itsaky.androidide.build.config.BuildConfig
import com.itsaky.androidide.desugaring.utils.JavaIOReplacements.applyJavaIOReplacements
import com.itsaky.androidide.plugins.AndroidIDEAssetsPlugin
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-kapt")
id("kotlin-parcelize")
id("realm-android")
id("androidx.navigation.safeargs.kotlin")
id("com.itsaky.androidide.desugaring")
}
apply {
plugin(AndroidIDEAssetsPlugin::class.java)
}
buildscript {
dependencies {
classpath(libs.logging.logback.core)
classpath(libs.composite.desugaringCore)
}
}
android {
namespace = BuildConfig.packageName
defaultConfig {
applicationId = BuildConfig.packageName
vectorDrawables.useSupportLibrary = true
}
androidResources {
generateLocaleConfig = true
}
buildTypes {
release {
isShrinkResources = true
}
}
lint {
abortOnError = false
disable.addAll(arrayOf("VectorPath", "NestedWeights", "ContentDescription", "SmallSp"))
}
}
kapt {
arguments {
arg("eventBusIndex", "${BuildConfig.packageName}.events.AppEventsIndex")
}
}
desugaring {
replacements {
includePackage(
"org.eclipse.jgit",
)
applyJavaIOReplacements()
}
}
dependencies {
debugImplementation(libs.common.leakcanary)
// Annotation processors
kapt(libs.common.glide.ap)
kapt(libs.google.auto.service)
kapt(projects.annotationProcessors)
implementation(libs.common.editor)
implementation(libs.common.utilcode)
implementation(libs.common.glide)
implementation(libs.common.jsoup)
implementation(libs.common.kotlin.coroutines.android)
implementation(libs.common.retrofit)
implementation(libs.common.retrofit.gson)
implementation(libs.common.charts)
implementation(libs.common.hiddenApiBypass)
implementation(libs.google.auto.service.annotations)
implementation(libs.google.gson)
implementation(libs.google.guava)
// Git
implementation(libs.git.jgit)
// AndroidX
implementation(libs.androidx.splashscreen)
implementation(libs.androidx.annotation)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.cardview)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.coordinatorlayout)
implementation(libs.androidx.drawer)
implementation(libs.androidx.grid)
implementation(libs.androidx.nav.fragment)
implementation(libs.androidx.nav.ui)
implementation(libs.androidx.preference)
implementation(libs.androidx.recyclerview)
implementation(libs.androidx.transition)
implementation(libs.androidx.vectors)
implementation(libs.androidx.animated.vectors)
implementation(libs.androidx.work)
implementation(libs.androidx.work.ktx)
implementation(libs.google.material)
implementation(libs.google.flexbox)
// Kotlin
implementation(libs.androidx.core.ktx)
implementation(libs.common.kotlin)
// Dependencies in composite build
implementation(libs.composite.appintro)
implementation(libs.composite.desugaringCore)
implementation(libs.composite.javapoet)
// Local projects here
implementation(projects.actions)
implementation(projects.buildInfo)
implementation(projects.common)
implementation(projects.editor)
implementation(projects.termux.termuxApp)
implementation(projects.termux.termuxView)
implementation(projects.termux.termuxEmulator)
implementation(projects.termux.termuxShared)
implementation(projects.eventbus)
implementation(projects.eventbusAndroid)
implementation(projects.eventbusEvents)
implementation(projects.gradlePluginConfig)
implementation(projects.idestats)
implementation(projects.subprojects.aaptcompiler)
implementation(projects.subprojects.indexing)
implementation(projects.subprojects.javacServices)
implementation(projects.subprojects.xmlUtils)
implementation(projects.subprojects.projects)
implementation(projects.subprojects.toolingApi)
implementation(projects.logsender)
implementation(projects.lsp.api)
implementation(projects.lsp.java)
implementation(projects.lsp.xml)
implementation(projects.lexers)
implementation(projects.lookup)
implementation(projects.preferences)
implementation(projects.resources)
implementation(projects.treeview)
implementation(projects.templatesApi)
implementation(projects.templatesImpl)
implementation(projects.uidesigner)
implementation(projects.xmlInflater)
// This is to build the tooling-api-impl project before the app is built
// So we always copy the latest JAR file to assets
compileOnly(projects.subprojects.toolingApiImpl)
testImplementation(projects.testing.unit)
androidTestImplementation(projects.testing.android)
}