-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
138 lines (117 loc) · 4.45 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
138 lines (117 loc) · 4.45 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
138
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.serialization")
id("com.google.dagger.hilt.android")
id("com.google.devtools.ksp")
`maven-publish`
}
android {
namespace = "com.vanespark.googledrivesync"
compileSdk = 35
defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
}
dependencies {
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.21")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
// AndroidX Core
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
// WorkManager
implementation("androidx.work:work-runtime-ktx:2.9.1")
// Room (for sync state persistence)
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
// Hilt
implementation("com.google.dagger:hilt-android:2.52")
implementation("androidx.hilt:hilt-work:1.2.0")
ksp("com.google.dagger:hilt-compiler:2.52")
ksp("androidx.hilt:hilt-compiler:1.2.0")
// Google Drive API - exposed to consumers via api()
api("com.google.android.gms:play-services-auth:21.3.0")
api("com.google.api-client:google-api-client-android:2.8.1")
api("com.google.apis:google-api-services-drive:v3-rev20240521-2.0.0")
// Unit Testing
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.3")
testImplementation("io.mockk:mockk:1.13.12")
testImplementation("com.google.truth:truth:1.4.4")
testImplementation("app.cash.turbine:turbine:1.1.0")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
testImplementation("org.robolectric:robolectric:4.13")
testImplementation("androidx.test:core:1.6.1")
// Android Testing
androidTestImplementation("io.mockk:mockk-android:1.13.12")
androidTestImplementation("androidx.test:core:1.6.1")
androidTestImplementation("androidx.test:runner:1.6.2")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation("com.google.dagger:hilt-android-testing:2.52")
androidTestImplementation("androidx.room:room-testing:2.6.1")
}
// Configure JUnit 5
tasks.withType<Test> {
useJUnitPlatform()
}
// Maven publishing configuration
publishing {
publications {
register<MavenPublication>("release") {
groupId = "com.vanespark"
artifactId = "google-drive-sync"
version = "0.2.6"
afterEvaluate {
from(components["release"])
}
pom {
name.set("Android Google Drive Sync")
description.set("A robust, flexible Android library for synchronizing files with Google Drive")
url.set("https://github.com/scottgl9/android-google-drive-sync")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("scottgl9")
name.set("Scott Glover")
email.set("scottgl@gmail.com")
}
}
}
}
}
}