Skip to content

Commit

Permalink
Add build information and extra properties to application.properties. F…
Browse files Browse the repository at this point in the history
…ixes #142
  • Loading branch information
aalmiray committed Feb 3, 2016
1 parent 4ffe4ae commit abc706e
Show file tree
Hide file tree
Showing 30 changed files with 171 additions and 98 deletions.
Expand Up @@ -33,6 +33,8 @@ class GriffonExtension {

String applicationIconName = 'griffon.icns'

Map applicationProperties = [:]

GriffonExtension(Project project) {
}
}
Expand Up @@ -141,7 +141,7 @@ class GriffonPlugin implements Plugin<Project> {
'application.name' : resolveApplicationName(project),
'application.version': project.version,
'griffon.version' : extension.version
])
] + extension.applicationProperties)
}
}
}
Expand All @@ -165,7 +165,7 @@ class GriffonPlugin implements Plugin<Project> {
'application.name' : resolveApplicationName(project),
'application.version': project.version,
'griffon.version' : extension.version
])
] + extension.applicationProperties)
}
}
}
Expand Down
Expand Up @@ -120,7 +120,9 @@ public String get(@Nonnull String key) {
@Nonnull
public Set<String> keySet() {
Set<String> keys = new LinkedHashSet<>();

for (Object key : properties.keySet()) {
keys.add(String.valueOf(key));
}
return Collections.unmodifiableSet(keys);
}
}
Expand Up @@ -14,21 +14,31 @@ buildscript {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.0'
}
}

apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}

griffon {
disableDependencyResolution = false
includeGroovyDependencies = true
version = '${griffon_version}'
toolkit = 'javafx'
}

ext {
macosx = System.getProperty('os.name').contains('Mac OS')
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}

mainClassName = '${project_package}.Launcher'
Expand Down Expand Up @@ -78,6 +88,8 @@ tasks.withType(GroovyCompile) {
}

import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat

shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
Expand Down
@@ -1,10 +1,3 @@
import java.text.SimpleDateFormat

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
Expand All @@ -13,6 +6,7 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
@@ -1,2 +1,5 @@
application.name=@application.name@
application.version=@application.version@
build.date=@build.date@
build.time=@build.time@
build.revision=@build.revision@
Expand Up @@ -14,21 +14,31 @@ buildscript {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.0'
}
}

apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}

griffon {
disableDependencyResolution = false
includeGroovyDependencies = false
version = '${griffon_version}'
toolkit = 'javafx'
}

ext {
macosx = System.getProperty('os.name').contains('Mac OS')
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}

mainClassName = '${project_package}.Launcher'
Expand Down Expand Up @@ -80,6 +90,8 @@ tasks.withType(GroovyCompile) {
}

import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat

shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
Expand Down
@@ -1,10 +1,3 @@
import java.text.SimpleDateFormat

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
Expand All @@ -13,6 +6,7 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
@@ -1,2 +1,5 @@
application.name=@application.name@
application.version=@application.version@
build.date=@build.date@
build.time=@build.time@
build.revision=@build.revision@
Expand Up @@ -14,21 +14,31 @@ buildscript {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.0'
}
}

apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}

griffon {
disableDependencyResolution = false
includeGroovyDependencies = true
version = '${griffon_version}'
toolkit = 'lanterna'
}

ext {
macosx = System.getProperty('os.name').contains('Mac OS')
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}

mainClassName = '${project_package}.Launcher'
Expand Down Expand Up @@ -69,6 +79,8 @@ tasks.withType(GroovyCompile) {
}

import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat

shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
Expand Down
@@ -1,10 +1,3 @@
import java.text.SimpleDateFormat

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
Expand All @@ -13,6 +6,7 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
@@ -1,2 +1,5 @@
application.name=@application.name@
application.version=@application.version@
build.date=@build.date@
build.time=@build.time@
build.revision=@build.revision@
Expand Up @@ -14,21 +14,31 @@ buildscript {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.0'
}
}

apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}

griffon {
disableDependencyResolution = false
includeGroovyDependencies = false
version = '${griffon_version}'
toolkit = 'lanterna'
}

ext {
macosx = System.getProperty('os.name').contains('Mac OS')
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}

mainClassName = '${project_package}.Launcher'
Expand Down Expand Up @@ -71,6 +81,8 @@ tasks.withType(GroovyCompile) {
}

import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat

shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
Expand Down
@@ -1,10 +1,3 @@
import java.text.SimpleDateFormat

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
Expand All @@ -13,6 +6,7 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
@@ -1,2 +1,5 @@
application.name=@application.name@
application.version=@application.version@
build.date=@build.date@
build.time=@build.time@
build.revision=@build.revision@
Expand Up @@ -14,21 +14,31 @@ buildscript {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.1.5'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'de.gliderpilot.gradle.jnlp:gradle-jnlp-plugin:0.2.1'
classpath 'net.nemerosa:versioning:1.6.0'
}
}

apply plugin: 'groovy'
apply plugin: 'org.codehaus.griffon.griffon'
apply plugin: 'net.nemerosa.versioning'

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
macosx = System.getProperty('os.name').contains('Mac OS')
}

griffon {
disableDependencyResolution = false
includeGroovyDependencies = true
version = '${griffon_version}'
toolkit = 'pivot'
}

ext {
macosx = System.getProperty('os.name').contains('Mac OS')
applicationProperties = [
'build.date' : buildDate,
'build.time' : buildTime,
'build.revision': versioning.info.commit
]
}

mainClassName = '${project_package}.Launcher'
Expand Down Expand Up @@ -70,6 +80,8 @@ tasks.withType(GroovyCompile) {
}

import com.github.jengelman.gradle.plugins.shadow.transformers.*
import java.text.SimpleDateFormat

shadowJar {
transform(ServiceFileTransformer)
transform(ServiceFileTransformer) {
Expand Down
@@ -1,10 +1,3 @@
import java.text.SimpleDateFormat

Date buildTimeAndDate = new Date()
ext {
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
}

jar {
manifest {
Expand All @@ -13,6 +6,7 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})".toString(),
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down
@@ -1,2 +1,5 @@
application.name=@application.name@
application.version=@application.version@
build.date=@build.date@
build.time=@build.time@
build.revision=@build.revision@

0 comments on commit abc706e

Please sign in to comment.