-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathbuild.gradle
More file actions
78 lines (68 loc) · 2.59 KB
/
build.gradle
File metadata and controls
78 lines (68 loc) · 2.59 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
/*
* Nextcloud Android Single-Sign-On Library
*
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
apply plugin: 'com.android.application'
android {
namespace 'com.nextcloud.android.sso.sample'
compileSdk 34
defaultConfig {
applicationId "com.nextcloud.android.sso.sample"
minSdk 22
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
//task downloadNextcloudApk(type: Download) {
// src 'https://download.nextcloud.com/android/dev/latest.apk'
// dest new File(buildDir, 'latest.apk')
// overwrite true
//}
//
//task setupNextcloudEnvironment(dependsOn: downloadNextcloudApk) {
// def bridge = AndroidDebugBridge.createBridge(android.adbExecutable.path, false, 10, TimeUnit.SECONDS)
// doLast {
// bridge.devices.each { device ->
// println "Uninstall Nextcloud apk from ${device.name}"
// device.uninstallPackage("com.nextcloud.android.beta")
//
// println "Install Nextcloud apk on ${device.name}"
// device.installPackage(new File(buildDir, 'latest.apk').getAbsolutePath(), true)
//
// println "Grant permissions to Nextcloud"
// device.executeShellCommand("pm grant com.nextcloud.android.beta android.permission.READ_EXTERNAL_STORAGE", NullOutputReceiver.receiver, 3, TimeUnit.SECONDS)
// }
// }
//}
//
//tasks.whenTaskAdded { taskItem ->
// if (taskItem.name.contains("connected") && taskItem.name.endsWith("AndroidTest")) {
// taskItem.dependsOn setupNextcloudEnvironment
// }
//}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.22"))
implementation project(path: ':lib')
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
}