Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
89 lines (74 sloc) 2.84 KB
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)
}
}
}
}