build.gradle 2 build.gradle.kts
This commit is contained in:
1 parent
a6af25ae88
commit
52273db482
6 files changed
+131
-151
No files matched your search
@@ -1,140 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.application'
|
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion Integer.parseInt("$compileSdkVer")
|
|
||||||
buildToolsVersion "$buildToolsVer"
|
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "com.v2ray.ang"
|
|
||||||
minSdkVersion 21
|
|
||||||
targetSdkVersion Integer.parseInt("$targetSdkVer")
|
|
||||||
multiDexEnabled true
|
|
||||||
versionCode 540
|
|
||||||
versionName "1.8.15"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
zipAlignEnabled false
|
|
||||||
shrinkResources false
|
|
||||||
ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
debug {
|
|
||||||
minifyEnabled false
|
|
||||||
zipAlignEnabled false
|
|
||||||
shrinkResources false
|
|
||||||
ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// flavorDimensions "versions"
|
|
||||||
//
|
|
||||||
// productFlavors {
|
|
||||||
// dev {
|
|
||||||
// applicationIdSuffix = ".dev"
|
|
||||||
// versionNameSuffix = "-dev"
|
|
||||||
// }
|
|
||||||
// pre_release {
|
|
||||||
// applicationIdSuffix = ".pre"
|
|
||||||
// versionNameSuffix = "-pre-release"
|
|
||||||
// }
|
|
||||||
// prod {
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
jniLibs.srcDirs = ['libs']
|
|
||||||
java.srcDirs += 'src/main/kotlin'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
||||||
|
|
||||||
splits {
|
|
||||||
abi {
|
|
||||||
enable true
|
|
||||||
reset()
|
|
||||||
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' //select ABIs to build APKs for
|
|
||||||
universalApk true //generate an additional APK that contains all the ABIs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// map for the version code
|
|
||||||
project.ext.versionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
|
|
||||||
|
|
||||||
android.applicationVariants.all { variant ->
|
|
||||||
// assign different version code for each output
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
output.outputFileName = "v2rayNG_" + variant.versionName + "_" + output.getFilter(com.android.build.OutputFile.ABI) + ".apk"
|
|
||||||
|
|
||||||
output.versionCodeOverride =
|
|
||||||
project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) *
|
|
||||||
1000000 + android.defaultConfig.versionCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
buildConfig true
|
|
||||||
}
|
|
||||||
namespace 'com.v2ray.ang'
|
|
||||||
testNamespace 'com.v2ray.angTest'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
|
|
||||||
// Androidx
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
||||||
implementation 'com.google.android.material:material:1.11.0'
|
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
|
||||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.5.7'
|
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
|
||||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
|
|
||||||
|
|
||||||
// Androidx ktx
|
|
||||||
implementation 'androidx.activity:activity-ktx:1.7.1'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
|
|
||||||
|
|
||||||
//kotlin
|
|
||||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.8.0"
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
|
|
||||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
|
|
||||||
|
|
||||||
implementation 'com.tencent:mmkv-static:1.3.3'
|
|
||||||
implementation 'com.google.code.gson:gson:2.10.1'
|
|
||||||
implementation 'io.reactivex:rxjava:1.3.8'
|
|
||||||
implementation 'io.reactivex:rxandroid:1.2.1'
|
|
||||||
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
|
|
||||||
implementation 'com.github.jorgecastilloprz:fabprogresscircle:1.01@aar'
|
|
||||||
implementation 'me.drakeet.support:toastcompat:1.1.0'
|
|
||||||
implementation 'com.blacksquircle.ui:editorkit:2.8.0'
|
|
||||||
implementation 'com.blacksquircle.ui:language-base:2.8.0'
|
|
||||||
implementation 'com.blacksquircle.ui:language-json:2.8.0'
|
|
||||||
implementation 'io.github.g00fy2.quickie:quickie-bundled:1.6.0'
|
|
||||||
implementation 'com.google.zxing:core:3.5.3'
|
|
||||||
|
|
||||||
def work_version = "2.8.1"
|
|
||||||
|
|
||||||
implementation "androidx.work:work-runtime-ktx:$work_version"
|
|
||||||
implementation "androidx.work:work-multiprocess:$work_version"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
import com.android.build.gradle.internal.api.ApkVariantImpl
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("org.jetbrains.kotlin.android")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.v2ray.ang"
|
||||||
|
compileSdk = 34
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.v2ray.ang"
|
||||||
|
minSdk = 21
|
||||||
|
targetSdk = 34
|
||||||
|
versionCode = 541
|
||||||
|
versionName = "1.8.15"
|
||||||
|
multiDexEnabled = true
|
||||||
|
ndk {
|
||||||
|
abiFilters += listOf("armeabi-v7a","arm64-v8a","x86","x86_64")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
|
||||||
|
}
|
||||||
|
debug {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
getByName("main") {
|
||||||
|
jniLibs.srcDirs("libs")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
splits {
|
||||||
|
abi {
|
||||||
|
isEnable = true
|
||||||
|
isUniversalApk = true
|
||||||
|
include("armeabi-v7a","arm64-v8a","x86","x86_64")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
applicationVariants.all {
|
||||||
|
val variant = this
|
||||||
|
val versionCodes =
|
||||||
|
mapOf("armeabi-v7a" to 1, "arm64-v8a" to 2, "x86" to 3, "x86_64" to 4, "all" to 0)
|
||||||
|
|
||||||
|
variant.outputs
|
||||||
|
.map { it as com.android.build.gradle.internal.api.ApkVariantOutputImpl }
|
||||||
|
.forEach { output ->
|
||||||
|
val abi = if (output.getFilter(com.android.build.OutputFile.ABI) != null)
|
||||||
|
output.getFilter(com.android.build.OutputFile.ABI)
|
||||||
|
else
|
||||||
|
"all"
|
||||||
|
output.outputFileName = "v2rayNG_${variant.versionName}_${abi}.apk"
|
||||||
|
output.versionCodeOverride = (1000000 * versionCodes[abi]!!).plus(
|
||||||
|
variant.versionCode
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
viewBinding = true
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar","*.jar"))))
|
||||||
|
testImplementation("junit:junit:4.13.2")
|
||||||
|
|
||||||
|
// Androidx
|
||||||
|
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
||||||
|
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||||
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
|
implementation("com.google.android.material:material:1.11.0")
|
||||||
|
implementation("androidx.cardview:cardview:1.0.0")
|
||||||
|
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||||
|
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||||||
|
implementation("androidx.fragment:fragment-ktx:1.5.7")
|
||||||
|
implementation("androidx.multidex:multidex:2.0.1")
|
||||||
|
implementation("androidx.viewpager2:viewpager2:1.1.0-beta02")
|
||||||
|
|
||||||
|
// Androidx ktx
|
||||||
|
implementation("androidx.activity:activity-ktx:1.7.1")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1")
|
||||||
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
|
||||||
|
|
||||||
|
//kotlin
|
||||||
|
implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.0")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
|
||||||
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
||||||
|
|
||||||
|
implementation("com.tencent:mmkv-static:1.3.3")
|
||||||
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
|
implementation("io.reactivex:rxjava:1.3.8")
|
||||||
|
implementation("io.reactivex:rxandroid:1.2.1")
|
||||||
|
implementation("com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar")
|
||||||
|
implementation("com.github.jorgecastilloprz:fabprogresscircle:1.01@aar")
|
||||||
|
implementation("me.drakeet.support:toastcompat:1.1.0")
|
||||||
|
implementation("com.blacksquircle.ui:editorkit:2.8.0")
|
||||||
|
implementation("com.blacksquircle.ui:language-base:2.8.0")
|
||||||
|
implementation("com.blacksquircle.ui:language-json:2.8.0")
|
||||||
|
implementation("io.github.g00fy2.quickie:quickie-bundled:1.6.0")
|
||||||
|
implementation("com.google.zxing:core:3.5.3")
|
||||||
|
|
||||||
|
implementation("androidx.work:work-runtime-ktx:2.8.1")
|
||||||
|
implementation("androidx.work:work-multiprocess:2.8.1")
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
||||||
plugins {
|
|
||||||
id 'com.android.application' version '7.4.2' apply false
|
|
||||||
id 'com.android.library' version '7.4.2' apply false
|
|
||||||
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
plugins {
|
||||||
|
id("com.android.application") version "7.4.2" apply false
|
||||||
|
id("com.android.library") version "7.4.2" apply false
|
||||||
|
id("org.jetbrains.kotlin.android") version "1.8.0" apply false
|
||||||
|
}
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
|
|
||||||
buildToolsVer=34.0.0
|
|
||||||
compileSdkVer=34
|
|
||||||
targetSdkVer=34
|
|
||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ dependencyResolutionManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "V2rayNG"
|
rootProject.name = "V2rayNG"
|
||||||
include ':app'
|
include(":app")
|
||||||
Reference in new issue
Block a user