mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
78 lines
2.1 KiB
Kotlin
78 lines
2.1 KiB
Kotlin
@file:Suppress("UnstableApiUsage")
|
|
|
|
import com.itsaky.androidide.build.config.BuildConfig
|
|
import com.itsaky.androidide.plugins.TerminalBootstrapPackagesPlugin
|
|
|
|
plugins {
|
|
id("com.android.library")
|
|
id("kotlin-android")
|
|
}
|
|
|
|
apply {
|
|
plugin(TerminalBootstrapPackagesPlugin::class.java)
|
|
}
|
|
|
|
val packageVariant = System.getenv("TERMUX_PACKAGE_VARIANT") ?: "apt-android-7" // Default: "apt-android-7"
|
|
|
|
android {
|
|
namespace = "com.termux"
|
|
ndkVersion = BuildConfig.ndkVersion
|
|
|
|
defaultConfig {
|
|
|
|
buildConfigField("String", "TERMUX_PACKAGE_VARIANT", "\"" + packageVariant + "\"") // Used by TermuxApplication class
|
|
|
|
manifestPlaceholders["TERMUX_PACKAGE_NAME"] = BuildConfig.packageName
|
|
manifestPlaceholders["TERMUX_APP_NAME"] = "AndroidIDE"
|
|
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
cFlags("-std=c11", "-Wall", "-Wextra", "-Werror", "-Os", "-fno-stack-protector", "-Wl,--gc-sections")
|
|
}
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
ndkBuild {
|
|
path = file("src/main/cpp/Android.mk")
|
|
}
|
|
}
|
|
|
|
lint.disable += "ProtectedPermissions"
|
|
|
|
testOptions {
|
|
unitTests {
|
|
isIncludeAndroidResources = true
|
|
}
|
|
}
|
|
|
|
packaging.jniLibs.useLegacyPackaging = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.annotation)
|
|
implementation(libs.androidx.core)
|
|
implementation(libs.androidx.drawer)
|
|
implementation(libs.androidx.preference)
|
|
implementation(libs.androidx.viewpager)
|
|
implementation(libs.google.material)
|
|
implementation(libs.google.guava)
|
|
implementation(libs.common.markwon.core)
|
|
implementation(libs.common.markwon.extStrikethrough)
|
|
implementation(libs.common.markwon.linkify)
|
|
implementation(libs.common.markwon.recycler)
|
|
|
|
implementation(projects.common)
|
|
implementation(projects.preferences)
|
|
implementation(projects.resources)
|
|
implementation(projects.termux.termuxView)
|
|
implementation(projects.termux.termuxShared)
|
|
|
|
testImplementation(projects.subprojects.testingUnit)
|
|
}
|
|
|
|
tasks.register("versionName") {
|
|
doLast {
|
|
print(project.rootProject.version)
|
|
}
|
|
} |