-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
99 lines (88 loc) · 2.61 KB
/
build.gradle
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.8.0'
repositories {
mavenCentral()
google()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdk 34
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
consumerProguardFiles 'proguard-rules.txt'
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_static"
// In case you need to see the build commands used by CMake, try
// arguments "-DANDROID_STL=c++_static", "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
}
}
ndk {
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
stl 'c++_static'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
kotlinOptions {
jvmTarget = "17"
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
ndkVersion '23.1.7779620'
namespace 'ag.boersego.bgjs'
}
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.11'
compileOnly "androidx.annotation:annotation:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt project(path: ':ejecta-v8:v8annotations-compiler')
api project(path: ':ejecta-v8:v8annotations')
api 'com.github.franmontiel:PersistentCookieJar:v1.0.1'
}
task distributeDebug() {
doFirst {
delete "dist/debug"
mkdir "dist/debug/jni"
copy {
from "build/intermediates/library_jni/debug/jni"
into "dist/debug/jni"
}
}
}
task distributeRelease {
doFirst {
delete "dist/release"
mkdir "dist/release/jni"
copy {
from "build/intermediates/library_jni/release/jni"
into "dist/release/jni"
}
}
}
afterEvaluate {
copyDebugJniLibsProjectOnly.finalizedBy distributeDebug
copyReleaseJniLibsProjectOnly.finalizedBy distributeRelease
}