-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
103 lines (85 loc) · 1.89 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
apply plugin: 'java';
apply plugin: 'eclipse';
apply plugin: 'maven-publish';
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = 1.5
targetCompatibility = 1.5
configurations {
compile
runtime { extendsFrom compile }
}
//
// Repositories for dependency resolution
//
repositories {
mavenCentral()
maven {
url "http://repo.opengeo.org/"
}
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
}
}
//
// Java Compilation flags
//
compileJava {
options.compilerArgs << '-g:none'
}
//
// Project dependencies
//
dependencies {
testCompile 'junit:junit:4.6'
compile group: 'com.fasterxml.util', name: 'java-merge-sort', version: '1.0.0'
compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'
compile group: 'com.vividsolutions', name: 'jts', version: '1.13'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--always'
standardOutput = stdout
}
return stdout.toString().trim()
}
publishing {
publications {
geoxplib(MavenPublication) {
from components.java
//artifact jar
groupId 'com.geoxp'
artifactId 'geoxplib'
version getVersionName()
}
}
}
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 = ['geoxplib']
pkg {
repo = 'maven'
name = 'geoxplib'
licenses = ['AGPL-V3','GeoXPLicenseException']
vcsUrl = 'https://github.com/hbs/geoxplib.git'
version {
name = getVersionName()
released = new Date()
vcsTag = getVersionName()
}
}
}