/
build.gradle.kts
119 lines (103 loc) · 3.34 KB
/
build.gradle.kts
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
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.jetbrains.kotlin.android)
`maven-publish`
signing
}
android {
compileSdk = 34
namespace = "com.tazkiyatech.utils"
defaultConfig {
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
isMinifyEnabled = false
isShrinkResources = false
}
release {
isMinifyEnabled = false
isShrinkResources = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
lint {
abortOnError = true
}
publishing {
singleVariant("release") {
withJavadocJar()
withSourcesJar()
}
}
}
dependencies {
api(libs.espresso.contrib)
api(libs.uiautomator)
implementation(libs.test.core)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.junit.jupiter.engine)
testImplementation(libs.junit.jupiter.params)
androidTestImplementation(libs.test.ext.junit)
}
tasks.withType<Test> {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("release") {
afterEvaluate {
from(components["release"])
}
groupId = properties["groupId"].toString()
artifactId = properties["artifactId"].toString()
version = properties["version"].toString()
pom {
name = project.properties["artifactId"].toString()
description =
"An Android library containing classes and methods designed to ease the writing of Android instrumentation tests."
url = "https://github.com/TazkiyaTech/android-test-utils"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
organization {
name = "Tazkiya Tech"
url = "http://tazkiyatech.com"
}
developers {
developer {
id = "adil-hussain-84"
name = "Adil Hussain"
email = "adilson05uk@gmail.com"
}
}
scm {
connection = "scm:git:git://github.com/TazkiyaTech/android-test-utils.git"
developerConnection = "scm:git:ssh://github.com:TazkiyaTech/android-test-utils.git"
url = "https://github.com/TazkiyaTech/android-test-utils"
}
}
}
}
repositories {
maven {
name = "sonatype"
credentials(PasswordCredentials::class)
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
}
}
signing {
// the "signing.keyId", "signing.password" and "signing.secretKeyRingFile" properties required by this task are defined outside of this project in the "~/.gradle/gradle.properties" file
sign(publishing.publications["release"])
}