-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
88 lines (74 loc) · 2.84 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
apply plugin:'base'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'project-report'
group = 'com.kenshoo.gradle.plugins'
version = '3.1.1.1'
task('wrapper', type: Wrapper).configure {
gradleVersion = '2.2'
}
sourceCompatibility = 1.7
[compileJava, compileTestJava]*.options.collect {options -> options.encoding = 'UTF-8'}
sourceSets {
integrationTest {
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.testRuntime + configurations.testCompile
runtimeClasspath = sourceSets.main.output + sourceSets.test.output + configurations.testRuntime + configurations.testCompile
groovy {
srcDir 'src/integration/groovy/'
}
}
}
dependencies {
compile group: 'org.codehaus.groovy', name: 'groovy', version: '2.3.7'
compile gradleApi()
compile 'org.liquibase:liquibase-core:3.1.1'
compile group: 'com.kenshoo', name: 'groovy-liquibase-dsl', version: '3.1.1.1'
compile group: 'org.apache', name: 'log4j', version: '1.2.8'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.6.1'
compile group: 'com.thoughtworks.qdox', name: 'qdox', version: '2.0'
testCompile 'mysql:mysql-connector-java:5.1.35'
testCompile 'postgresql:postgresql:9.1-901.jdbc4'
testCompile 'junit:junit:4.11'
}
if(project.hasProperty('standalone')){
jar.baseName = 'liquibase-standalone'
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest { attributes 'Main-Class': 'com.kenshoo.liquibase.Main' }
exclude('META-INF/*.SF')
}
}
task integrationTest(type: Test, description: 'Runs all integration tests') {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
task generateLimitSubnets << {
if(project.hasProperty('limitedSubnets')){
def limit = new File("${project.buildDir.name}/classes/main/LimitedSubnets.groovy")
limit.write(project.limitedSubnets.toString())
}
}
jar.dependsOn(generateLimitSubnets)
if(new File('serverUpload.gradle').exists()){
apply from:'serverUpload.gradle'
} else {
uploadArchives {
repositories.mavenDeployer {
repository(url: "file:///${System.getProperty('user.home')}/kenshoo/maven-repository/")
}
}
}
uploadArchives {
def password = project.hasProperty('password') ? "$password" : ''
repositories {
mavenDeployer {
repository(url: "https://kenshoo.jfrog.io/kenshoo/simple/libs-releases-local/") {
authentication(userName: "deployer", password: password)
}
snapshotRepository(url: "https://kenshoo.jfrog.io/kenshoo/simple/libs-snapshots-local/") {
authentication(userName: "deployer", password: password)
}
}
}
}