forked from JetBrains/Exposed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·194 lines (163 loc) · 5.24 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import java.time.Duration
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url "http://dl.bintray.com/kotlin/kotlin"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.avast.gradle:gradle-docker-compose-plugin:0.5.2"
}
}
plugins {
id "com.jfrog.bintray" version "1.8.0"
id 'net.researchgate.release' version '2.7.0'
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
apply plugin: "maven-publish"
apply plugin: 'docker-compose'
sourceCompatibility = 1.6
targetCompatibility = 1.6
defaultTasks 'jar'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task exposedDialectTestWithDocker(type: Test) {
systemProperties['exposed.test.dialects'] = dialect
}
exposedDialectTestWithDocker.doFirst {
def containerInfo = dockerCompose.servicesInfos[dialect]
systemProperty 'exposed.test.' + dialect + '.host', containerInfo.host
systemProperty 'exposed.test.oracle.port', containerInfo.ports[1521]
systemProperty 'exposed.test.sqlserver.port', containerInfo.ports[1433]
systemProperty 'exposed.test.mariadb.port', containerInfo.ports[3306]
}
dockerCompose.isRequiredBy(exposedDialectTestWithDocker)
dockerCompose {
useComposeFiles = ['docker-compose-' + dialect + '.yml']
captureContainersOutput = true
removeVolumes = true
environment.put 'COMPOSE_CONVERT_WINDOWS_PATHS', 'true'
waitForHealthyStateTimeout = Duration.ofMinutes(60)
}
artifacts {
archives sourcesJar
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url "http://dl.bintray.com/kotlin/kotlin"
}
maven {
url "https://packages.atlassian.com/maven-3rdparty-legacy/"
}
}
dependencies {
testCompile "mysql:mysql-connector-java:5.1.46"
testCompile "mysql:mysql-connector-mxj:5.0.12"
testCompile "org.mariadb.jdbc:mariadb-java-client:2.3.0"
testCompile 'org.postgresql:postgresql:42.2.2.jre6'
testCompile 'com.opentable.components:otj-pg-embedded:0.12.0'
testCompile 'org.xerial:sqlite-jdbc:3.23.1'
testCompile 'com.oracle:ojdbc6:12.1.0.1-atlassian-hosted'
testCompile 'com.microsoft.sqlserver:mssql-jdbc:6.4.0.jre7'
}
test {
jvmArgs "-XX:MaxPermSize=256m"
if (System.properties['exposed.test.dialects'] != null) {
systemProperties['exposed.test.dialects'] = System.properties['exposed.test.dialects']
}
testLogging {
events "PASSED", "FAILED", "SKIPPED"
showStandardStreams = true
exceptionFormat = 'full'
}
}
publishing {
publications {
exposed(MavenPublication) {
from components.java
artifact sourcesJar
artifactId = 'exposed'
}
spring_transaction(MavenPublication) {
def springModule = findProject(":spring-transaction")
from springModule.components.java
artifact springModule.sourcesJar
artifactId = 'spring-transaction'
}
}
}
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 = ['exposed', 'spring_transaction']
pkg {
userOrg = 'kotlin'
repo = 'exposed'
name = 'exposed'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/JetBrains/Exposed.git'
}
}
afterReleaseBuild.dependsOn bintrayUpload
task wrapper(type: Wrapper) {
gradleVersion = "4.10.2"
}
allprojects {
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
group = 'org.jetbrains.exposed'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compileOnly 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1'
compile 'joda-time:joda-time:2.9.9'
compile 'org.slf4j:slf4j-api:1.7.25'
compileOnly 'com.h2database:h2:1.4.197'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testCompile 'org.slf4j:slf4j-log4j12:1.7.25'
testCompile 'log4j:log4j:1.2.17'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'com.h2database:h2:1.4.197'
}
}
project(":spring-transaction") {
apply plugin: 'kotlin'
dependencies {
compile "org.springframework:spring-jdbc:$spring_version"
compile "org.springframework:spring-context:$spring_version"
compile rootProject
testCompile "org.springframework:spring-test:$spring_version"
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
/*
kotlin {
experimental {
coroutines "enable"
}
}
*/