-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
112 lines (94 loc) · 3.05 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
//
// Copyright (c) 2011-2019 by Curalate, Inc.
//
plugins {
id 'io.codearte.nexus-staging' version '0.21.1'
id 'java-library'
id 'maven-publish'
id 'signing'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
}
dependencies {
// We use OkHttp for networking and Moshi for JSON deserialization
implementation 'com.squareup.okhttp3:okhttp:4.5.0'
implementation 'com.squareup.moshi:moshi:1.9.2'
implementation 'com.squareup.moshi:moshi-adapters:1.9.2'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
group = 'com.curalate'
version = '0.1.5'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'android-sdk'
from components.java
artifact sourcesJar
artifact javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Curalate Android SDK'
description = "API client to call Curalate's API methods from an Android app (or other project running on the JDK)"
url = 'https://curalate.com'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'curalate_engineering'
name = 'Curalate Engineering'
email = 'support@curalate.com'
}
}
scm {
connection = 'scm:git:https://github.com/curalate/curalate-android-sdk'
developerConnection = 'scm:git:https://github.com/curalate/curalate-android-sdk'
url = 'https://github.com/curalate/curalate-android-sdk'
}
}
}
}
repositories {
// Maven Central
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = isReleaseVersion ? releasesRepoUrl : snapshotsRepoUrl
credentials {
username = nexusUsername
password = nexusPassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
nexusStaging {
username = nexusUsername
password = nexusPassword
}