-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
128 lines (106 loc) · 3.03 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
apply plugin: 'java'
apply plugin: 'maven'
group = 'com.memoizr'
version = 'v0.1.1'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
ext {
bintrayRepo = 'maven'
bintrayName = 'retro-optional'
publishedGroupId = 'com.memoizr'
libraryName = 'retro-optional'
artifact = 'retro-optional'
libraryDescription = 'A backport of Java 8 optional for Java 7'
siteUrl = 'https://github.com/memoizr/retro-optional'
gitUrl = 'https://github.com/memoizr/retro-optional'
libraryVersion = '0.9.3'
developerId = 'memoizr'
developerName = 'memoizr'
developerEmail = 'memoizrlabs@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
install {
repositories.mavenInstaller {
pom.project {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}
apply plugin: 'com.jfrog.bintray'
Properties myproperties = new Properties()
myproperties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = myproperties.getProperty("bintray.user")
key = myproperties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = myproperties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}
apply plugin: 'maven'
task createPom << {
pom {
project {
groupId 'com.memoizr'
artifactId 'retro-optional'
version 'v0.1.0'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}.writeTo("pom.xml")
}