Skip to content

Commit

Permalink
Update jar to use uncompiled groovy files
Browse files Browse the repository at this point in the history
- This update helps with Groovy mismatched versions
  • Loading branch information
Nicholas Mathison committed Oct 25, 2016
1 parent 7b35b14 commit 911d358
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.git/
.gradle/
build/
gradle.properties
32 changes: 21 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
['groovy', 'maven', 'signing'].each {
apply plugin: it
}
defaultTasks 'clean', 'jar', 'copyDocs'
//defaultTasks 'clean', 'jar', 'copyDocs'
defaultTasks 'clean', 'compileJava', 'compileGroovy', 'processResources', 'classes', 'createJar', 'copyGroovyJar', 'copyDocs'

group = 'com.ibm.urbancode.plugins'
archivesBaseName = 'groovy-plugin-utils'
// Use -Psnapshot=false to produce new releases
version = '1.0' + ((hasProperty('snapshot') && snapshot == 'false') ? '' : '-SNAPSHOT')
version = '1.1' + ((hasProperty('snapshot') && snapshot == 'false') ? '' : '-SNAPSHOT')

jar.archiveName "${archivesBaseName}-${version}.jar"

Expand Down Expand Up @@ -37,8 +38,8 @@ uploadArchives {

pom.project {
name "${group}:${archivesBaseName}"
description 'A set of utility scripts than can be used in community plugins on JazzHub'
url 'https://hub.jazz.net/project/crr/groovy-plugin-utils'
description 'A set of utility scripts that can be used in community plugins on GitHub.'
url 'https://github.com/IBM-UrbanCode/groovy-plugin-utils'
licenses {
license {
name 'Eclipse Public License, Version 1.0'
Expand All @@ -47,16 +48,16 @@ uploadArchives {
}
developers {
developer {
name 'Chris Rees'
email 'crr@us.ibm.com'
name 'Nicholas Mathison'
email 'nhmathis@us.ibm.com'
organization 'IBM'
organizationUrl 'http://www.ibm.com'
}
}
scm {
connection 'scm:git:https://hub.jazz.net/git/crr/groovy-plugin-utils'
developerConnection 'scm:git:https://hub.jazz.net/git/crr/groovy-plugin-utils'
url 'https://hub.jazz.net/project/crr/groovy-plugin-utils'
connection 'scm:git:https://github.com/IBM-UrbanCode/groovy-plugin-utils.git'
developerConnection 'scm:git:https://github.com/IBM-UrbanCode/groovy-plugin-utils.git'
url 'https://github.com/IBM-UrbanCode/groovy-plugin-utils'
}
}
}
Expand All @@ -75,8 +76,18 @@ task groovyDocJar(type: Jar) {
from groovydoc
}

task createJar(type: Exec) {
commandLine "jar", "cf", "build/tmp/${jar.archiveName}", "-C", "src/main/groovy", "."
}

task copyGroovyJar(type: Copy) {
from "build/tmp/${jar.archiveName}"
into 'build/libs'
}

def groovyJar = file("build/libs/${jar.archiveName}")
artifacts {
archives jar, sourcesJar, groovyDocJar
archives groovyJar, sourcesJar, groovyDocJar
}

/**
Expand All @@ -95,4 +106,3 @@ task copyDocs(type: Copy) {
from groovydoc
into('docs')
}

0 comments on commit 911d358

Please sign in to comment.