/
build.gradle
87 lines (73 loc) · 2.33 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'signing'
apply plugin: 'maven'
repositories {
mavenCentral()
}
dependencies {
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.google.code.gson:gson:2.3'
compile 'com.auth0:java-jwt:2.0.1'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task fatJar(type: Jar) {
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
artifacts {
archives jar, javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
allprojects { ext."signing.keyId" = '77890410' }
allprojects { ext."signing.secretKeyRingFile" = '/home/pyros2097/Code/src/playlyfe.com/playlyfe-java-sdk/secring.gpg' }
allprojects { ext."signing.password" = 'tester' }
mavenPomDir = "build/libs"
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: 'playlyfe', password: 'playlyfe@playlyfe')
}
pom.version = '1.1.0'
pom.groupId = 'com.playlyfe'
pom.artifactId = 'playlyfe-java-sdk'
pom.project {
name 'Playlyfe Java and Android SDK'
description 'This is the official OAuth 2.0 Java and Android client SDK for the Playlyfe API. It supports the client_credentials and authorization code OAuth 2.0 flows.'
url 'https://github.com/playlyfe/playlyfe-java-sdk'
inceptionYear '2014'
scm {
url 'https://github.com/playlyfe/playlyfe-java-sdk'
connection 'scm:git@github.com:playlyfe/playlyfe-java-sdk.git'
developerConnection 'scm:git@github.com:playlyfe/playlyfe-java-sdk.git'
}
licenses {
license {
name 'The MIT License (MIT)'
url 'https://github.com/playlyfe/playlyfe-java-sdk/blob/master/LICENSE.md'
distribution 'repo'
}
}
developers {
developer {
id 'playlyfe'
name 'Peter John'
email 'peter@playlyfe.com'
}
}
}
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
}
}
}