Skip to content

Commit

Permalink
Bumped the Groovy dependency and released 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesaliman committed Mar 1, 2015
1 parent 2f8ac99 commit 4f85fdc
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 42 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Changes for 1.0.1
=================
- Updated the DSL to support Liquibase 3.3.2 (Issue #45)

- Updated the Groovy dependency to 2.4.1.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ creation of changelogs in a Groovy DSL, rather than hurtful XML. If this DSL
isn't reason enough to adopt Liquibase, then there is no hope for you.

## News
###February 22, 2015
I'm currently working on the 1.0.1 release, which will support Liquibase 3.3.2.
I expect this to be released in the next week or so.
###March 1, 2015
The Liquibase Groovy DSL now supports Liquibase 3.3.2, and is built with Groovy
2.4.1.

###June 15, 2014
We are proud to announce the long awaited release of version 1.0.0 of the
Expand Down
58 changes: 29 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ apply plugin: 'signing'

group = 'net.saliman'
archivesBaseName = 'groovy-liquibase-dsl'
version = '1.0.1-SNAPSHOT'
version = '1.0.1'
ext.isSnapshot = version.endsWith('SNAPSHOT')

if ( isSnapshot ) {
println "using snapshot"
ext.mavenCentralUploadUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
println 'using snapshot'
ext.mavenCentralUploadUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
} else {
println "using staging"
ext.mavenCentralUploadUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
println 'using staging'
ext.mavenCentralUploadUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}

configurations {
Expand All @@ -30,13 +30,13 @@ repositories {


dependencies {
compile 'org.codehaus.groovy:groovy:1.8.6'
testCompile 'junit:junit:4.8.2'
// compile 'org.liquibase:liquibase-core:3.2.0'
compile 'org.codehaus.groovy:groovy:2.4.1'
compile 'org.codehaus.groovy:groovy-sql:2.4.1'
compile 'org.liquibase:liquibase-core:3.3.2'
testRuntime 'com.h2database:h2:1.3.159'
archives "org.apache.maven.wagon:wagon-ssh:2.2"
archives "org.apache.maven.wagon:wagon-ssh-external:2.2"
testCompile 'junit:junit:4.12'
testRuntime 'com.h2database:h2:1.4.185'
archives 'org.apache.maven.wagon:wagon-ssh:2.8'
archives 'org.apache.maven.wagon:wagon-ssh-external:2.8'
}


Expand Down Expand Up @@ -67,29 +67,29 @@ signing {
import org.gradle.plugins.signing.Sign
gradle.taskGraph.whenReady { taskGraph ->
tasks.withType(org.gradle.plugins.signing.Sign).all {
required = taskGraph.hasTask(":uploadArchives") && !isSnapshot
required = taskGraph.hasTask(':uploadArchives') && !isSnapshot
if ( required ) {
// Use Java's console to read from the console (no good for a CI
// environment)
Console console = System.console()
console.printf "\n\nWe have to sign some things in this build...\n\n"
console.printf '\n\nWe have to sign some things in this build...\n\n'

if ( !project.hasProperty('signing.keyId') ) {
def id = console.readLine("PGP Public Key Id: ")
allprojects { ext."signing.keyId" = id }
def id = console.readLine('PGP Public Key Id: ')
allprojects { ext.'signing.keyId' = id }
}

if ( !project.hasProperty('signing.secretKeyRingFile') ) {
def file = console.readLine("PGP Secret Key Ring File (absolute path): ")
allprojects { ext."signing.secretKeyRingFile" = file }
def file = console.readLine('PGP Secret Key Ring File (absolute path): ')
allprojects { ext.'signing.secretKeyRingFile' = file }
}

if ( !project.hasProperty('signing.password') ) {
def password = console.readPassword("PGP Private Key Password: ")
allprojects { ext."signing.password" = password }
def password = console.readPassword('PGP Private Key Password: ')
allprojects { ext.'signing.password' = password }
}

console.printf "\nThanks.\n\n"
console.printf '\nThanks.\n\n'
}
}
}
Expand All @@ -98,20 +98,20 @@ uploadArchives {
// We can't use taskGraph.whenReady because it doesn't resolve until after
// configuration. The startParameter is not as good, but it probably
// good enough for our purposes.
if ( gradle.startParameter.taskNames.contains("uploadArchives") ) {
if ( gradle.startParameter.taskNames.contains('uploadArchives') ) {
// Use Java's console to read from the console (no good for a CI
// environment)
Console console = System.console()
console.printf "\n\nWe have to upload some things in this build...\n\n"
console.printf '\n\nWe have to upload some things in this build...\n\n'

if ( !project.hasProperty('mavenCentralUsername') ) {
def mavenCentralUsername = console.readLine("Maven Central Username: ")
allprojects { ext."mavenCentralUsername" = mavenCentralUsername }
def mavenCentralUsername = console.readLine('Maven Central Username: ')
allprojects { ext.'mavenCentralUsername' = mavenCentralUsername }
}

if ( !project.hasProperty('mavenCentralPassword') ) {
def mavenCentralPassword = console.readLine("Maven Central Password: ")
allprojects { ext."mavenCentralPassword" = mavenCentralPassword }
def mavenCentralPassword = console.readLine('Maven Central Password: ')
allprojects { ext.'mavenCentralPassword' = mavenCentralPassword }
}

repositories {
Expand All @@ -120,12 +120,12 @@ uploadArchives {
beforeDeployment { signing.signPom(it) }
}
configuration = configurations.archives
//repository(url: "file://$buildDir/m2repo")
//repository(url: 'file://$buildDir/m2repo')
repository(url: mavenCentralUploadUrl) {
authentication(userName: mavenCentralUsername,
password: mavenCentralPassword)
releases(updatePolicy: "always")
snapshots(updatePolicy: "always")
releases(updatePolicy: 'always')
snapshots(updatePolicy: 'always')
}
pom.project(pomConfiguration)
}
Expand Down
19 changes: 10 additions & 9 deletions liquibase.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ repositories {
}

dependencies {
groovy 'org.codehaus.groovy:groovy:1.7.5'
runtime 'org.liquibase:liquibase-core:3.1.1'
runtime 'mysql:mysql-connector-java:5.1.9'
runtime 'org.codehaus.groovy:groovy:2.4.1'
runtime 'org.codehaus.groovy:groovy-sql:2.4.1'
runtime 'org.liquibase:liquibase-core:3.3.2'
runtime 'mysql:mysql-connector-java:5.1.34'
}


Expand Down Expand Up @@ -135,14 +136,14 @@ def liquibaseRollback(dryRun) {
suffix = 'rollback'
param = tag
}

if(dryRun) {
suffix = suffix + 'SQL'
}

argList << suffix
argList << param

runLiquibase(argList)
}

Expand All @@ -158,7 +159,7 @@ def liquibaseUpdate(dryRun) {
}

def argList = [ "update${suffix}" ]

if(count) {
argList << count
}
Expand All @@ -174,7 +175,7 @@ def runLiquibase(String command) {
def runLiquibase(List argList) {
def contexts = System.properties['liquibase.contexts']
def stdArgs = ["--url=${project.database.url}", "--username=${project.database.username}", "--password=${project.database.password}"]

if(project.database.changeLogFile) {
stdArgs << "--changeLogFile=${project.database.changeLogFile}"
}
Expand All @@ -187,7 +188,7 @@ def runLiquibase(List argList) {
if(contexts) {
stdArgs << "--contexts=${contexts}"
}

javaexec {
workingDir = database.workingDir ?: projectDir
main = 'liquibase.integration.commandline.Main'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ changeSet(id: 'drop-table', author: 'tlberglund') {

def serializedText = serializer.serialize(changeSet, true)
def expectedText = """\
changeSet(id: 'drop-table', author: 'tlberglund', runAlways: true, runOnChange: true, context: 'staging,dev', dbms: 'oracle,mysql') {
changeSet(id: 'drop-table', author: 'tlberglund', runAlways: true, runOnChange: true, context: 'dev,staging', dbms: 'oracle,mysql') {
comment "${comment}"
dropTable(schemaName: 'schema', tableName: 'monkey')
addForeignKeyConstraint(baseColumnNames: 'emotion_id', baseTableName: 'monkey', baseTableSchemaName: 'base_schema', constraintName: 'fk_monkey_emotion', deferrable: true, initiallyDeferred: true, onDelete: 'CASCADE', onUpdate: 'CASCADE', referencedColumnNames: 'id', referencedTableName: 'emotions', referencedTableSchemaName: 'referenced_schema')
Expand Down

0 comments on commit 4f85fdc

Please sign in to comment.