-
Notifications
You must be signed in to change notification settings - Fork 21
Chore - Convert Maven build to Gradle #35
Comments
Encountered various issues with Gradle in Travis CI. Will close this chore and perhaps revisit / retry it in the future (but put it as low priority):
|
Reopening this as it warrants further investigation, could be just Gradle configuration issues. Reference: buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.5"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.11"
}
}
plugins {
id 'idea'
id 'net.researchgate.release' version '2.4.1'
}
group = 'com.builtamont'
version = '0.10-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
description = """Cassandra Migration"""
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.7
targetCompatibility = 1.7
compileJava.options.fork = false
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
sourceSets {
itest {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
kotlin.srcDirs += 'src/itest/java'
java.srcDirs += 'src/itest/java'
resources.srcDirs += 'src/itest/resources'
}
}
configurations {
itestCompile.extendsFrom testCompile
itestRuntime.extendsFrom testRuntime
}
task itest(type: Test) {
testClassesDir = sourceSets.itest.output.classesDir
classpath = sourceSets.itest.runtimeClasspath
// NOTE: Not needed, but shows which test has run
// as each integration test case run can be slow
testLogging {
events "passed", "skipped", "failed"
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version:'1.0.5'
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.21'
compile group: 'commons-logging', name: 'commons-logging', version:'1.2'
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version:'3.0.0'
testCompile group: 'org.slf4j', name: 'slf4j-simple', version:'1.7.21'
testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version:'1.10.19'
testCompile group: 'com.nhaarman', name: 'mockito-kotlin', version:'1.0.1'
testCompile group: 'org.hamcrest', name: 'hamcrest-junit', version:'2.0.0.0'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules', version:'1.16.0'
testCompile(group: 'org.cassandraunit', name: 'cassandra-unit', version:'3.0.0.1') {
exclude(module: 'slf4j-log4j12')
exclude(module: 'logback-core')
exclude(module: 'logback-classic')
}
testCompile group: 'com.google.guava', name: 'guava', version:'19.0'
testCompile group: 'io.kotlintest', name: 'kotlintest', version:'1.3.5'
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version:'1.0.5'
itestCompile sourceSets.main.output
itestCompile configurations.testCompile
itestCompile sourceSets.test.output
itestRuntime configurations.testRuntime
}
check {
dependsOn itest
}
artifacts {
archives javadocJar, sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
def ossrhUsername = System.getenv('SONATYPE_USERNAME')
def ossrhPassword = System.getenv('SONATYPE_PASSWORD')
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Cassandra Migration'
packaging 'jar'
description 'Database migration tool for Apache Cassandra / DataStax Enterprise'
url 'https://github.com/builtamont-oss/cassandra-migration'
scm {
url 'https://github.com/builtamont-oss/cassandra-migration'
connection 'scm:git:https://github.com/builtamont-oss/cassandra-migration.git'
developerConnection 'scm:git:https://github.com/builtamont-oss/cassandra-migration.git'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'hhandoko'
name 'Herdy Handoko'
url 'http://github.com/hhandoko'
}
}
}
}
}
}
build {
afterReleaseBuild.dependsOn uploadArchives
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
release {
failOnPublishNeeded = false
} |
Was able to reproduce the Java 1.7 issue (with Azul Zulu 1.7 JDK). The root cause seems to be the Why did Maven test work and not Gradle?
|
Narrowed down the cause, it seems system properties are not read from |
Unsupported JVM version error fixed, next issue identified is to publish JAR with dependencies for use in integration test. |
Merged latest |
Context
Whilst Maven is a mature and capable product, Gradle provides feature parity (in regards with this project) with a more concise and readable syntax.
Definition of Done
Project is build, tested, and deployed via Gradle.
The text was updated successfully, but these errors were encountered: