This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
118 lines (97 loc) · 2.96 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.2.1/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven'
id 'signing'
id 'java'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenLocal()
mavenCentral()
jcenter()
}
test {
testLogging.showStandardStreams = true
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'com.google.code.gson:gson:2.3.1'
api 'org.apache.httpcomponents:httpclient:4.5.7'
api 'org.apache.httpcomponents:httpmime:4.5.7'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
javadoc {
source = sourceSets.main.java.srcDirs
classpath = sourceSets.main.runtimeClasspath
}
def props = new Properties()
file("src/main/resources/app.properties").withInputStream {
stream -> props.load(stream)
}
version = props.getProperty("version")
group = 'com.kloudless'
archivesBaseName = "kloudless-java"
sourceCompatibility = 1.8
targetCompatibility = 1.8
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'kloudless-java'
packaging 'jar'
description 'The Kloudless Java SDK allows developers to code once and integrate several \
cloud services.'
url 'https://kloudless.com'
scm {
connection 'scm:git:https://github.com/Kloudless/kloudless-java.git'
developerConnection 'scm:git:git@github.com:Kloudless/kloudless-java.git'
url 'https://github.com/Kloudless/kloudless-java'
}
licenses {
license {
name 'The MIT License (MIT)'
url 'https://github.com/Kloudless/kloudless-java/blob/master/LICENSE'
}
}
developers {
developer {
id 'kloudless'
name 'Kloudless Team'
email 'hello@kloudless.com'
}
}
}
}
}
}