This repository has been archived by the owner on Jan 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (105 loc) · 3.47 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
plugins {
id "java"
id "maven-publish"
id "com.jfrog.bintray" version "1.6"
}
sourceCompatibility = 1.7
repositories {
jcenter()
}
dependencies {
testCompile group: "junit", name: "junit", version: "4.12"
testCompile group: "org.reflections", name: "reflections", version: "0.9.10"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
group PACKAGE_GROUP
version PACKAGE_VERSION
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = "javadoc"
from javadoc.destinationDir
}
task sourceJar(type: Jar) {
classifier = "sources"
from sourceSets.main.allSource
}
publishing {
publications {
ArelPublication(MavenPublication) {
groupId PACKAGE_GROUP
artifactId PACKAGE_NAME
version PACKAGE_VERSION
from components.java
artifact(javadocJar) {
classifier = "javadoc"
}
artifact(sourceJar) {
classifier = "sources"
}
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name PACKAGE_NAME
description PACKAGE_DESCRIPTION
url PACKAGE_WEBSITE
scm {
url GITHUB_URL
connection GITHUB_REPOSITORY_URL
developerConnection GITHUB_REPOSITORY_DEVELOPER_URL
}
licenses {
license {
name "The MIT License (MIT)"
url "https://opensource.org/licenses/MIT"
distribution "repo"
}
}
developers {
developer {
id DEVELOPER_1_ID
name DEVELOPER_1_NAME
email DEVELOPER_1_EMAIL
}
}
}
}
}
}
repositories {
maven {
url "file:/${project.projectDir}/build/artifacts"
}
}
}
bintray {
user = project.hasProperty("BINTRAY_USER") ? project.property("BINTRAY_USER") : System.getenv("BINTRAY_USER")
key = project.hasProperty("BINTRAY_API_KEY") ? project.property("BINTRAY_API_KEY") : System.getenv("BINTRAY_API_KEY")
publish = true
pkg {
userOrg = BINTRAY_ORGANIZATION
repo = BINTRAY_REPOSITORY
name = BINTRAY_NAME
desc = PACKAGE_DESCRIPTION
websiteUrl = PACKAGE_WEBSITE
issueTrackerUrl = GITHUB_ISSUES_URL
vcsUrl = GITHUB_REPOSITORY_URL
licenses = ["MIT"]
publicDownloadNumbers = true
githubRepo = GITHUB_REPOSITORY
githubReleaseNotesFile = GITHUB_README_FILE
version {
name = PACKAGE_VERSION
desc = PACKAGE_DESCRIPTION
released = new Date()
vcsTag = "v" + PACKAGE_VERSION
mavenCentralSync {
sync = SYNC_MAVEN_CENTRAL
user = project.hasProperty("SONATYPE_OSS_USER") ? project.property("SONATYPE_OSS_USER") : System.getenv("SONATYPE_OSS_USER")
password = project.hasProperty("SONATYPE_OSS_PASSWORD") ? project.property("SONATYPE_OSS_PASSWORD") : System.getenv("SONATYPE_OSS_PASSWORD")
close = "1"
}
}
}
publications = ["ArelPublication"]
}