-
Notifications
You must be signed in to change notification settings - Fork 737
Expand file tree
/
Copy pathbuild.gradle
More file actions
137 lines (117 loc) · 4.21 KB
/
build.gradle
File metadata and controls
137 lines (117 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.mozilla.rust-android-gradle.rust-android'
}
def localProps = new Properties()
def localPropsFile = rootProject.file('local.properties')
if (localPropsFile.exists()) {
localPropsFile.withInputStream { localProps.load(it) }
}
android {
namespace 'org.proxydroid'
compileSdk 34
ndkVersion "25.1.8937393"
signingConfigs {
release {
def keystorePath = localProps.getProperty('KEYSTORE_PATH')
if (keystorePath) {
storeFile file(keystorePath)
storePassword localProps.getProperty('KEYSTORE_PASSWORD')
keyAlias localProps.getProperty('KEY_ALIAS')
keyPassword localProps.getProperty('KEY_PASSWORD')
}
}
}
defaultConfig {
applicationId "org.proxydroid"
minSdk 24
targetSdk 35
versionCode 74
versionName "3.4.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
if (localProps.getProperty('KEYSTORE_PATH')) {
signingConfig signingConfigs.release
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
externalNativeBuild {
cmake {
version '3.22.1'
path "src/main/cpp/CMakeLists.txt"
}
}
lint {
abortOnError false
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.3'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
cargo {
module = "src/main/rust/proxydroid-tun2socks"
libname = "proxydroid_tun2socks"
targets = ["arm", "arm64", "x86", "x86_64"]
profile = "release"
prebuiltToolchains = true
}
tasks.whenTaskAdded { task ->
if (task.name == 'mergeDebugJniLibFolders' || task.name == 'mergeReleaseJniLibFolders' ||
task.name == 'javaPreCompileDebug' || task.name == 'javaPreCompileRelease') {
task.dependsOn 'cargoBuild'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.10.1'
// Exclude JUnit from json-simple (it pulls junit as compile dependency)
implementation('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
}
implementation 'org.mozilla:rhino:1.7.14'
// Compose
def composeBom = platform('androidx.compose:compose-bom:2023.10.01')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material:material-icons-extended'
implementation 'androidx.compose.ui:ui-tooling-preview'
debugImplementation 'androidx.compose.ui:ui-tooling'
implementation 'androidx.activity:activity-compose:1.8.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2'
implementation 'androidx.lifecycle:lifecycle-runtime-compose:2.6.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.3.1'
// Android instrumented test dependencies
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}