forked from briangormanly/4dflib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (92 loc) · 3.03 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
['java', 'maven', 'signing', 'maven-publish'].each {
apply plugin : it
}
group = 'com.fdflib'
version = '1.4.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.12',
'mysql:mysql-connector-java:5.1.44',
'org.mariadb.jdbc:mariadb-java-client:2.7.0',
'org.postgresql:postgresql:9.4-1200-jdbc41',
'org.hsqldb:hsqldb:2.3.4',
'com.zaxxer:HikariCP:2.5.1'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
}
task sourcesJar (type : Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar (type: Jar, dependsOn: javadoc) { // (1)
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
fdflib(MavenPublication) {
artifactId '4dflib'
from components.java
}
}
repositories {
maven {
credentials {
username ossrhUsername
password ossrhPassword
}
if(project.version.endsWith('-SNAPSHOT')) {
url 'https://oss.sonatype.org/content/repositories/snapshots'
} else {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
}
}
}
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name '4dflib'
packaging 'jar'
description '4DF (4th Dimensional Form) Library and ORM Tool'
url 'https://github.com/briangormanly/4dflib'
scm {
connection 'scm:git:https://github.com/briangormanly/4dflib.git'
developerConnection 'scm:git:[email protected]/briangormanly/4dflib.git'
url 'https://github.com/briangormanly/4dflib.git'
}
licenses {
license {
name 'GNU Lesser General Public License v3 (LGPL)'
url 'http://www.gnu.org/copyleft/lesser.html'
distribution 'repo'
}
}
developers {
developer {
id 'bgormanly'
name 'Brian Gormanly'
email '[email protected]'
}
}
}
}
}
}