forked from microsoft/mssql-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
83 lines (69 loc) · 1.91 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
apply plugin: 'java'
archivesBaseName = 'mssql-jdbc'
version = '6.1.6'
allprojects {
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
systemProperty "file.encoding", "UTF-8"
}
}
def excludedFile = ''
if(build == "build41") {
jar.archiveName = "${archivesBaseName}-${version}.jre7.jar"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
if(build == "build42") {
jar.archiveName = "${archivesBaseName}-${version}.jre8.jar"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc41.java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
jar {
manifest {
attributes 'Title': "Microsoft JDBC Driver ${version} for SQL Server",
'Version': version,
'Vendor': 'Microsoft Corporation'
}
}
sourceSets {
main {
java {
srcDirs 'src/main/java'
exclude excludedFile
}
resources {
srcDirs "$projectDir"
include 'META-INF/services/java.sql.Driver'
}
}
test {
resources {
srcDirs 'src/test/resources'
include '**/*.csv'
output.resourcesDir = output.classesDir
}
}
}
//Get dependencies from Maven central repository
repositories {
mavenCentral()
}
dependencies {
compile 'com.microsoft.azure:azure-keyvault:0.9.7',
'com.microsoft.azure:adal4j:1.1.3'
testCompile 'junit:junit:4.12',
'org.junit.platform:junit-platform-console:1.0.0-M3',
'org.junit.platform:junit-platform-commons:1.0.0-M3',
'org.junit.platform:junit-platform-engine:1.0.0-M3',
'org.junit.platform:junit-platform-launcher:1.0.0-M3',
'org.junit.platform:junit-platform-runner:1.0.0-M3',
'org.junit.platform:junit-platform-surefire-provider:1.0.0-M3',
'org.junit.jupiter:junit-jupiter-api:5.0.0-M3',
'org.junit.jupiter:junit-jupiter-engine:5.0.0-M3',
'com.zaxxer:HikariCP:2.6.0',
'org.apache.commons:commons-dbcp2:2.1.1'
}