Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move integration tests to own source set #6

Merged
merged 1 commit into from
Dec 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,17 @@ tasks.withType(Checkstyle) {
}
}

sourceSets {
integration
}

dependencies {
compile 'com.fluxchess:jcpi:1.1.+'

testCompile 'junit:junit:4.+'

integrationCompile project(':')
integrationCompile 'junit:junit:4.+'
}

sourceCompatibility = 1.7
Expand All @@ -96,11 +103,6 @@ jar {
}
}

task testsJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests'
from sourceSets.test.output
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
Expand All @@ -111,6 +113,11 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}

task integration(type: Test) {
testClassesDir = sourceSets.integration.output.classesDir
classpath = sourceSets.integration.runtimeClasspath
}

task dist(type: Zip) {
def baseDir = "${project.name}-${project.version}"

Expand All @@ -120,7 +127,6 @@ task dist(type: Zip) {
from 'COPYING.LESSER'

from jar
from testsJar
from sourcesJar
from javadocJar

Expand All @@ -139,14 +145,20 @@ task dist(type: Zip) {
}

artifacts {
archives testsJar
archives sourcesJar
archives javadocJar
}

uploadArchives {
if (project.hasProperty('branchName')) {
if (branchName == releaseBranch) {
if (version.contains('-')) {
ext.repositoryName = 'staging'
} else {
ext.repositoryName = 'release'
}
println "Queuing upload to ${repositoryName}."

configurations {
deployerJars
}
Expand All @@ -158,7 +170,7 @@ uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: 's3://maven.fluxchess.com/release') {
repository(url: "s3://maven.fluxchess.com/${repositoryName}") {
authentication(userName: s3AccessKeyId, passphrase: s3SecretAccessKey)
}
}
Expand Down