/* * This file is part of AndroidIDE. * * AndroidIDE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * AndroidIDE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with AndroidIDE. If not, see . */ @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.core.common) implementation(projects.core.resources) implementation(projects.termux.view) implementation(projects.termux.shared) implementation(projects.utilities.preferences) testImplementation(projects.testing.unitTest) } tasks.register("versionName") { doLast { print(project.rootProject.version) } }