-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle
149 lines (124 loc) · 4.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
plugins {
id 'nebula.optional-base' version '3.2.0' // mvn style optional dependencies
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'nebula.optional-base'
group 'com.miragesql'
version '2.1.2'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
// JavaDoc 8 problems
javadoc { failOnError false }
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version,
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion,
'Target-JDK': project.targetCompatibility)
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
// set these to 'dummy' for Travis CI
def stUser = rootProject.hasProperty('ossrhUsername')? ossrhUsername: 'dummy'
def stPwd = rootProject.hasProperty('ossrhPassword')? ossrhPassword: 'dummy'
uploadArchives.repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: stUser, password: stPwd)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: stUser, password: stPwd)
}
pom.project {
name 'Mirage-SQL'
description 'Mirage-SQL is an easy and powerful SQL centric database access library for Java (or JVM based languages) which provides dynamic SQL templates in plain SQL files.'
url 'https://github.com/mirage-sql/mirage'
packaging 'jar'
organization {
name 'Mirage-SQL'
url 'https://github.com/mirage-sql/'
}
scm {
connection 'scm:git:https://github.com/mirage-sql/mirage.git'
developerConnection 'scm:git:https://github.com/mirage-sql/mirage.git'
url 'https://github.com/mirage-sql/mirage'
}
issueManagement {
system 'GitHub Issues'
url 'https://github.com/mirage-sql/mirage/issues'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'takezoe'
name 'Naoki Takezoe'
email 'takezoe_at_gmail.com'
url 'http://d.hatena.ne.jp/takezoe/'
timezone '+9'
}
developer {
id 'daisuke'
name 'Daisuke Miyamoto'
email 'dai.0304_at_gmail.com'
url 'http://d.hatena.ne.jp/daisuke-m/'
timezone '+9'
}
developer {
id 'aadrian'
name 'Adrian A.'
email 'a.adrian.tech_at_gmail.com'
url 'https://github.com/aadrian'
timezone '+1'
}
}
}
}
}
//displayName "Mirage-SQL"
description "Mirage-SQL is an easy and powerful SQL centric database access library for Java (or JVM based languages) which provides dynamic SQL templates in plain SQL files."
dependencies {
compile 'org.javassist:javassist:3.24.0-GA'
compile 'ognl:ognl:3.2.4'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'commons-dbcp:commons-dbcp:1.4', optional
compile 'com.zaxxer:HikariCP:2.7.6', optional
compileOnly 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1' // provided
compileOnly 'javax.servlet:servlet-api:2.5' // provided
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'
testImplementation 'org.apache.commons:commons-lang3:3.7'
testImplementation 'com.h2database:h2:1.4.196'
testImplementation 'org.hsqldb:hsqldb:2.4.0'
// Use the latest Groovy version for Spock testing
testImplementation 'org.codehaus.groovy:groovy-all:2.4.13'
// Use the awesome Spock testing and specification framework even with Java
testImplementation 'org.spockframework:spock-core:1.1-groovy-2.4'
}