2021-07-25 18:31:32 +02:00
|
|
|
plugins {
|
|
|
|
id 'com.android.library'
|
|
|
|
}
|
2020-03-09 14:30:14 +01:00
|
|
|
|
2020-03-10 15:58:29 +01:00
|
|
|
version wireguardVersionName
|
|
|
|
group groupName
|
|
|
|
|
2020-03-09 14:30:14 +01:00
|
|
|
android {
|
2023-01-20 00:34:47 +01:00
|
|
|
compileSdk 33
|
2020-03-09 14:30:14 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2023-01-20 14:35:10 +01:00
|
|
|
namespace 'com.wireguard.android.tunnel'
|
2020-03-09 14:30:14 +01:00
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion 21
|
2023-03-22 16:54:33 +01:00
|
|
|
targetSdkVersion 33
|
2020-03-10 04:54:27 +01:00
|
|
|
versionCode wireguardVersionCode
|
|
|
|
versionName wireguardVersionName
|
2020-03-09 14:30:14 +01:00
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path 'tools/CMakeLists.txt'
|
|
|
|
}
|
|
|
|
}
|
2020-03-14 06:02:12 +01:00
|
|
|
testOptions.unitTests.all {
|
|
|
|
testLogging {
|
|
|
|
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
|
|
|
|
}
|
|
|
|
}
|
2020-03-29 09:18:38 +02:00
|
|
|
buildTypes {
|
2023-04-05 13:50:48 +02:00
|
|
|
all {
|
2020-03-29 09:18:38 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2023-04-05 12:20:46 +02:00
|
|
|
targets 'libwg-go.so', 'libwg.so', 'libwg-quick.so'
|
2023-04-05 13:50:48 +02:00
|
|
|
arguments "-DGRADLE_USER_HOME=${project.gradle.gradleUserHomeDir}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DANDROID_PACKAGE_NAME=${groupName}"
|
2020-03-29 09:18:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
debug {
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2023-04-05 13:50:48 +02:00
|
|
|
arguments "-DANDROID_PACKAGE_NAME=${groupName}.debug"
|
2020-03-29 09:18:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-21 15:30:38 +01:00
|
|
|
lint {
|
|
|
|
disable 'LongLogTag', 'NewApi'
|
2020-04-18 22:29:51 +02:00
|
|
|
}
|
2023-03-28 13:59:08 +02:00
|
|
|
publishing {
|
|
|
|
multipleVariants("release") {
|
|
|
|
allVariants()
|
|
|
|
}
|
|
|
|
}
|
2020-03-09 14:30:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation "androidx.annotation:annotation:$annotationsVersion"
|
|
|
|
implementation "androidx.collection:collection:$collectionVersion"
|
2021-10-27 22:19:02 +02:00
|
|
|
compileOnly "com.google.code.findbugs:jsr305:$jsr305Version"
|
2020-03-14 06:02:12 +01:00
|
|
|
testImplementation "junit:junit:$junitVersion"
|
2020-03-09 14:30:14 +01:00
|
|
|
}
|
2020-03-10 07:21:51 +01:00
|
|
|
|
|
|
|
apply from: "publish.gradle"
|