forked from dtmo/jfiglet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
129 lines (109 loc) · 3.67 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
128
129
//// Apply the java-library plugin to add support for Java Library
plugins {
id 'java-library'
id 'com.jfrog.bintray' version '1.7.3'
id 'maven'
id 'maven-publish'
}
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'maven-publish'
ext {
// groovyVersion = "2.4.11"
}
allprojects {
group = "com.github.dtmo.jfiglet"
version = "1.0.0"
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
// mavenCentral()
}
}
dependencies {
testCompile "junit:junit:4.4"
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
dryRun = false //[Default: false] Whether to run this as dry-run, without deploying
publish = true //[Default: false] Whether version should be auto published after an upload
override = false //[Default: false] Whether to override version artifacts already published
pkg {
repo = 'maven'
name = 'com.github.dtmo.jfiglet:jfiglet'
// userOrg = user
licenses = ['BSD 3-Clause']
vcsUrl = 'https://github.com/dtmo/jfiglet'
version {
name = '1.0.0'
desc = 'JFiglet 1.0.0'
released = new Date()
vcsTag = '1.0.0'
githubRepo = 'dtmo/jfiglet' //Optional Github repository
githubReleaseNotesFile = 'README.md' //Optional Github readme file
// attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
}
//Optional configuration for Maven Central sync of the version
mavenCentralSync {
// sync = true
user = project.property('sonatypeUser')
password = project.property('sonatypePassword')
close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by putting 0 as value) and release the version manually.
}
}
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
// Create the pom configuration:
def pomConfig = {
licenses {
license {
name "The 3-Clause BSD License"
url "https://opensource.org/licenses/BSD-3-Clause"
distribution "repo"
}
}
developers {
developer {
id "dtmorgan"
name "Damian Morgan"
email "[email protected]"
}
}
scm {
url "https://github.com/dtmo/jfiglet"
}
}
// Create the publication with the pom configuration:
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'com.github.dtmo.jfiglet'
artifactId 'jfiglet'
version '1.0.0'
pom.withXml {
def root = asNode()
root.appendNode('description', 'Java FIGfont rendering API')
root.appendNode('name', 'jfiglet')
root.appendNode('url', 'https://github.com/dtmo/jfiglet')
root.children().last() + pomConfig
}
}
}
}