-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
178 lines (152 loc) · 5.56 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
buildscript {
ext.kotlin_version = "1.9.24"
ext.material_design_version = "1.12.0"
ext.dokka_version = '1.5.31'
ext.nexus_publish_version = "1.0.0"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:8.7.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.github.gradle-nexus:publish-plugin:$nexus_publish_version"
}
}
plugins {
id("maven-publish")
id("signing")
}
apply plugin: "com.android.library"
apply plugin: "kotlin-android"
apply plugin: "kotlin-kapt"
repositories {
mavenCentral()
google()
maven { url "https://jitpack.io" }
}
group = "ch.dreipol"
android {
compileSdk 35
namespace = "ch.dreipol.dreidroid"
lintOptions {
abortOnError false
}
defaultConfig {
minSdkVersion 25
targetSdkVersion 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
buildFeatures {
dataBinding = true
}
kotlinOptions {
freeCompilerArgs += '-Xexplicit-api=strict'
jvmTarget = "17"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
//task dokkaJavadocJar(type: Jar, dependsOn: dokkaHtml, group: 'publishing') {
// classifier('javadoc')
// from "$buildDir/javadoc"
//}
dependencies {
def nav_version = "2.8.4"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "androidx.core:core-ktx:1.15.0"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.test.espresso:espresso-core:3.6.1"
implementation "com.google.android.material:material:$material_design_version"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "androidx.test:rules:1.6.1"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
//noinspection FragmentGradleConfiguration
implementation "androidx.fragment:fragment-testing:1.8.5"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.2.1"
androidTestImplementation "androidx.test.espresso:espresso-core:3.6.1"
}
if (project == project.rootProject) {
apply plugin: "io.github.gradle-nexus.publish-plugin"
publishing {
signing {
def signingKey = System.getenv("PGP_KEY")
def signingPassword = ""
if (project.hasProperty('signing.password')) {
signingPassword = project.getProperty('signing.password')
}
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
nexusPublishing {
repositories {
sonatype {
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}
}
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
// The following applies a component to this publication
// which results in publishing an app bundle.
from components.release
artifactId = 'dreidroid'
pom {
name = 'dreidroid'
description = 'Shared Repository for Android projects'
url = 'https://github.com/dreipol/dreidroid'
scm {
url = 'https://github.com/dreipol/dreidroid'
connection = 'scm:https://github.com/dreipol/dreidroid.git'
developerConnection = 'scm:git://github.com/dreipol/dreidroid.git'
}
licenses {
license {
name = 'The MIT License'
url = 'https://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'melbic'
name = 'Samuel Bichsel'
email = '[email protected]'
}
developer {
id = 'kaiwidmer'
name = 'Kai Widmer'
email = '[email protected]'
}
developer {
id = 'tschuls'
name = 'Julia Strasser'
email = '[email protected]'
}
}
}
// artifact dokkaJavadocJar
}
}
}
}
}