-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
82 lines (71 loc) · 1.87 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
group = 'net.yageek.lambert'
version = '1.1'
buildscript {
repositories {
maven { url 'http://jcenter.bintray.com' }
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.3'
}
}
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'bintray'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.8.2'
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
def pomConfig = {
licenses {
license {
name "GNU General Public License v2.0"
url "www.gnu.org/licenses/gpl-2.0.html"
distribution "repo"
}
}
developers {
developer {
id "yageek"
name "Yannick Heinrich"
email "[email protected]"
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
pom.withXml {
def root = asNode()
root.appendNode('description', 'A gradle plugin for publishing to Bintray')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = user_name
key = api_key
publications = ['mavenJava'] // When uploading Maven-based publication files
pkg {
repo = 'maven'
name = 'lambert-java'
desc = 'A simple java library to convert Lambert Coordinates to GPS WGS84 coordinates based on the IGN alorithms and methods.'
licenses = ['GPL-2.0']
labels = ['lambert', 'java', 'gps']
}
}
task install(dependsOn: 'publishMavenJavaPublicationToMavenLocal') << {
logger.info "Installing $project.name"
}