-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathbuild.gradle
102 lines (89 loc) · 2.59 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
group 'com.guichaguri'
version '1.0.6'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
apply plugin: 'java'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
bintray {
def publishSettings = new Properties()
def propFile = file('publish.properties')
if (propFile.exists()) {
publishSettings.load(new FileInputStream(propFile))
}
user = publishSettings.bintray_user
key = publishSettings.bintray_key
publications = ['MavenBuild']
pkg {
repo = 'maven'
name = 'MinimalFTP'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/Guichaguri/MinimalFTP.git'
version {
name = project.version
gpg {
sign = Boolean.parseBoolean(publishSettings.gpg_sign)
passphrase = publishSettings.gpg_passphrase
}
mavenCentralSync {
sync = Boolean.parseBoolean(publishSettings.maven_sync)
user = publishSettings.maven_user
password = publishSettings.maven_password
}
}
}
}
def pomConfig = {
licenses {
license {
name "Apache License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "Guichaguri"
name "Guilherme Chaguri"
email "[email protected]"
}
}
scm {
url "https://github.com/Guichaguri/MinimalFTP/tree/master"
}
}
// Create the publication with the pom configuration:
publishing {
publications {
MavenBuild(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId project.group
artifactId 'minimalftp'
version project.version
pom.withXml {
def root = asNode()
root.appendNode('description', 'A lightweight, simple FTP server. Pure Java, no libraries.')
root.appendNode('name', project.name)
root.appendNode('url', 'https://github.com/Guichaguri/MinimalFTP')
root.children().last() + pomConfig
}
}
}
}