-
Notifications
You must be signed in to change notification settings - Fork 115
/
build.gradle
94 lines (82 loc) · 3.5 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
ext {
appAuthVersion = project.hasProperty('appAuthVersion') ? rootProject.ext.appAuthVersion : '0.9.1'
androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.7.0'
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
commonsIoVersion = project.hasProperty('commonsIoVersion') ? rootProject.ext.commonsIoVersion : '2.10.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
junit5Version = project.hasProperty('junit5Version') ? rootProject.ext.junit5Version : '5.7.2'
androidJunit5Version = project.hasProperty('androidJunit5Version') ? rootProject.ext.androidJunit5Version : '1.2.2'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
}
}
apply plugin: 'com.android.library'
android {
namespace "com.getcapacitor.community.genericoauth2"
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
versionCode 1
versionName "1.0"
// 1) Make sure to use the AndroidJUnitRunner, or a subclass of it. This requires a dependency on androidx.test:runner, too!
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// 2) Connect JUnit 5 to the runner
// testInstrumentationRunnerArgument("runnerBuilder", "de.mannodermaus.junit5.AndroidJUnit5Builder")
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
unitTestVariants.all {
it.mergedFlavor.manifestPlaceholders += [
appAuthRedirectScheme: "com.getcapacitor.community.genericoauth2app"
]
}
// testOptions {
// unitTests {
// all {
// include 'com.getcapacitor.community.genericoauth2'
// }
// }
// }
}
repositories {
google()
mavenCentral()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':capacitor-android')
implementation "androidx.browser:browser:$androidxBrowserVersion"
implementation "net.openid:appauth:$appAuthVersion"
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
// 4) Jupiter API & Test Runner, if you don't have it already
testImplementation("org.junit.jupiter:junit-jupiter-params:${junit5Version}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junit5Version}") {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation "commons-io:commons-io:$commonsIoVersion"
}
// ###############
// ### AppAuth ###
// ###############
android.defaultConfig.manifestPlaceholders = [
'appAuthRedirectScheme': 'com.getcapacitor.community.genericoauth2app'
]