forked from JetBrains/Exposed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·142 lines (119 loc) · 4.16 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
import java.time.Duration
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.avast.gradle:gradle-docker-compose-plugin:0.5.2"
}
}
plugins {
id 'java-library'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id 'maven-publish'
id "com.jfrog.bintray" version "1.8.4"
id 'net.researchgate.release' version '2.8.0'
}
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
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1'
api 'joda-time:joda-time:2.9.9'
api 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.h2database:h2:1.4.197'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation 'org.slf4j:slf4j-log4j12:1.7.25'
testImplementation 'log4j:log4j:1.2.17'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'com.h2database:h2:1.4.197'
testImplementation "mysql:mysql-connector-java:5.1.46"
testImplementation "mysql:mysql-connector-mxj:5.0.12"
testImplementation "org.mariadb.jdbc:mariadb-java-client:2.3.0"
testImplementation 'org.postgresql:postgresql:42.2.2.jre6'
testImplementation 'com.opentable.components:otj-pg-embedded:0.12.0'
testImplementation 'org.xerial:sqlite-jdbc:3.23.1'
testImplementation 'com.oracle:ojdbc6:12.1.0.1-atlassian-hosted'
testImplementation '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
groupId 'org.jetbrains.exposed'
artifact sourcesJar
artifactId = 'exposed'
}
}
}
afterReleaseBuild.dependsOn bintrayUpload
allprojects {
group = 'org.jetbrains.exposed'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url "https://packages.atlassian.com/maven-3rdparty-legacy/"
}
}
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']
pkg {
userOrg = 'kotlin'
repo = 'exposed'
name = 'exposed'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/JetBrains/Exposed.git'
}
}
}
wrapper {
gradleVersion = "5.2.1"
distributionType = Wrapper.DistributionType.ALL
}