Permalink
Browse files

Updates for Griffon 0.9.5

  • Loading branch information...
1 parent 36bccd5 commit d381590eea62cb659fc8fc31b21d4dc6c81ce15d @aalmiray aalmiray committed Mar 12, 2012
View
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main"/>
- <classpathentry kind="src" path="griffon-app/conf"/>
- <classpathentry kind="src" path="griffon-app/models"/>
- <classpathentry kind="src" path="griffon-app/views"/>
- <classpathentry kind="src" path="griffon-app/controllers"/>
- <classpathentry kind="src" path="griffon-app/resources"/>
- <classpathentry kind="src" path="test/integration"/>
- <classpathentry kind="src" path="test/unit"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="GRIFFON_HOME/ant/lib/ant.jar"/>
-<classpathentry kind="var" path="GRIFFON_HOME/lib/commons-logging-1.1.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/jline-0.9.94.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/gant_groovy1.6-1.6.0.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/junit-3.8.2.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/commons-cli-1.0.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/ant-1.7.1.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/log4j-1.2.15.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/svnkit-1.2.0.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/spring-2.5.6.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/ant-junit-1.7.1.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/ant-launcher-1.7.1.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/asm-2.2.3.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/commons-lang-2.4.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/ant-nodeps-1.7.1.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/groovy-all-1.7-beta-2.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/lib/ant-trax-1.7.1.jar" />
-
-
-<classpathentry kind="var" path="GRIFFON_HOME/dist/griffon-scripts-0.3-SNAPSHOT.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/dist/griffon-cli-0.3-SNAPSHOT.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/dist/griffon-resources-0.3-SNAPSHOT.jar" />
-
-<classpathentry kind="var" path="GRIFFON_HOME/dist/griffon-rt-0.3-SNAPSHOT.jar" />
-
-
- <classpathentry kind="output" path="staging/classes"/>
-</classpath>
View
@@ -0,0 +1 @@
+target
View
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>lwjgl</name>
- <comment/>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2010 the original author or authors.
+ * Copyright 2009-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import griffon.lwjgl.opengl.LWJGLCanvas
* @author Andres Almiray
*/
class LwjglGriffonAddon {
- def factories = [
+ Map factories = [
lwjglCanvas: new ComponentFactory(LWJGLCanvas)
]
}
View
@@ -18,19 +18,52 @@
* @author Andres Almiray
*/
class LwjglGriffonPlugin {
- def version = 0.4
- def dependsOn = [:]
- def toolkits = ['swing']
- def griffonVersion = '0.9.2 > *'
- def license = 'Apache Software License 2.0'
-
- def author = 'Andres Almiray'
- def authorEmail = 'aalmiray@users.sourceforge.net'
- def title = 'LWJGL support'
- def description = '''
-LWJGL support
-'''
+ // the plugin version
+ String version = '0.5'
+ // the version or versions of Griffon the plugin is designed for
+ String griffonVersion = '0.9.5 > *'
+ // the other plugins this plugin depends on
+ Map dependsOn = [swing: '0.9.5']
+ // resources that are included in plugin packaging
+ List pluginIncludes = []
+ // the plugin license
+ String license = 'Apache Software License 2.0'
+ // Toolkit compatibility. No value means compatible with all
+ // Valid values are: swing, javafx, swt, pivot, gtk
+ List toolkits = ['swing']
+ // Platform compatibility. No value means compatible with all
+ // Valid values are:
+ // linux, linux64, windows, windows64, macosx, macosx64, solaris
+ List platforms = []
+ // URL where documentation can be found
+ String documentation = ''
+ // URL where source can be found
+ String source = 'https://github.com/griffon/griffon-lwjgl-plugin'
+
+ List authors = [
+ [
+ name: 'Andres Almiray',
+ email: 'aalmiray@yahoo.com'
+ ]
+ ]
+ String title = "Render 3D content with JWJGL"
+ String description = '''
+Provides integration with [LWJGL][1], the Lightweight Java Game Library.
+
+Usage
+-----
+
+The following nodes will become available on a View script upon installing this plugin
- // URL to the plugin's documentation
- def documentation = 'http://griffon.codehaus.org/Lwjgl+Plugin'
+| *Node* | *Type* |
+| ----------- | ---------------------------------- |
+| lwjglCanvas | `griffon.lwjgl.opengl.LWJGLCanvas` |
+
+### Example
+
+A trivial example can be found at [https://github.com/aalmiray/griffon_sample_apps/tree/master/3d/lwjgl][2].
+
+[1]: http://lwjgl.org/
+[2]: https://github.com/aalmiray/griffon_sample_apps/tree/master/3d/lwjgl
+'''
}
View
@@ -1,2 +1,5 @@
-app.griffon.version=0.9.2-beta-3
+#Griffon Metadata file
+#Mon Mar 12 14:23:23 CET 2012
+app.griffon.version=0.9.5-rc2
app.name=lwjgl
+plugins.swing=0.9.5
@@ -2,13 +2,12 @@ griffon.project.dependency.resolution = {
inherits("global")
log "warn"
repositories {
- griffonPlugins()
griffonHome()
- griffonCentral()
-
mavenCentral()
mavenRepo 'http://repository.sonatype.org/content/groups/public'
- flatDir name: 'lwjglPluginLib', dirs: 'lib'
+ griffonHome()
+ String basePath = pluginDirPath? "${pluginDirPath}/" : ''
+ flatDir name: "lwjglLibDir", dirs: ["${basePath}lib"]
}
dependencies {
compile 'net.alchim31.3rd.org.7-zip:lzma:4.65',
@@ -28,5 +27,16 @@ griffon {
}
}
-griffon.jars.destDir='target/addon'
-griffon.plugin.pack.additional.sources = ['src/gdsl']
+log4j = {
+ // Example of changing the log pattern for the default console
+ // appender:
+ appenders {
+ console name: 'stdout', layout: pattern(conversionPattern: '%d [%t] %-5p %c - %m%n')
+ }
+
+ error 'org.codehaus.griffon',
+ 'org.springframework',
+ 'org.apache.karaf',
+ 'groovyx.net'
+ warn 'griffon'
+}
View
Binary file not shown.
View
@@ -1,13 +0,0 @@
-<plugin name='lwjgl' version='0.4' griffonVersion='0.9.2 &gt; *' jdk='1.5'>
- <author>Andres Almiray</author>
- <authorEmail>aalmiray@users.sourceforge.net</authorEmail>
- <title>LWJGL support</title>
- <description>LWJGL support</description>
- <documentation>http://griffon.codehaus.org/Lwjgl+Plugin</documentation>
- <license>Apache Software License 2.0</license>
- <toolkits>swing</toolkits>
- <resources>
- <resource>BuildConfig</resource>
- </resources>
- <dependencies />
-</plugin>
View
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2010 the original author or authors.
+ * Copyright 2009-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@
import griffon.util.Environment
-includeTargets << griffonScript("_GriffonSettings")
-
lwjglJnlpResources = []
def lwjgl_version = '2.6'
for(os in ['linux', 'macosx', 'windows', 'solaris']) {
@@ -49,19 +47,6 @@ eventCopyLibsEnd = { jardir ->
}
}
-def eventClosure2 = binding.variables.containsKey('eventSetClasspath') ? eventSetClasspath : {cl->}
-eventSetClasspath = { cl ->
- eventClosure2(cl)
- if(compilingPlugin('lwjgl')) return
- griffonSettings.dependencyManager.flatDirResolver name: 'griffon-lwjgl-plugin', dirs: "${lwjglPluginDir}/addon"
- griffonSettings.dependencyManager.addPluginDependency('lwjgl', [
- conf: 'compile',
- name: 'griffon-lwjgl-addon',
- group: 'org.codehaus.griffon.plugins',
- version: lwjglPluginVersion
- ])
-}
-
doWithPlatform = { platformOs ->
def origPlatformOs = platformOs
if(platformOs.endsWith('64')) platformOs -= '64'
View
@@ -1,34 +0,0 @@
-/*
- * Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Andres Almiray
- */
-
-// check to see if we already have a LwjglGriffonAddon
-boolean addonIsSet1
-builderConfig.each() { prefix, v ->
- v.each { builder, views ->
- addonIsSet1 = addonIsSet1 || 'LwjglGriffonAddon' == builder
- }
-}
-
-if (!addonIsSet1) {
- println 'Adding LwjglGriffonAddon to Builder.groovy'
- builderConfigFile.append('''
-root.'LwjglGriffonAddon'.addon=true
-''')
-}
View
@@ -1,31 +0,0 @@
-/*
- * Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @author Andres Almiray
- */
-
-// check to see if we already have a LwjglGriffonAddon
-boolean addonIsSet1
-builderConfig.each() { prefix, v ->
- v.each { builder, views ->
- addonIsSet1 = addonIsSet1 || 'LwjglGriffonAddon' == builder
- }
-}
-
-if(addonIsSet1) {
- builderConfigFile.text = builderConfigFile.text - "root.'LwjglGriffonAddon'.addon=true\n"
-}
View
@@ -1,10 +0,0 @@
-//
-// This script is executed by Griffon during application upgrade ('griffon upgrade'
-// command). This script is a Gant script so you can use all special variables
-// provided by Gant (such as 'baseDir' which points on project base dir). You can
-// use 'ant' to access a global instance of AntBuilder
-//
-// For example you can create directory under project tree:
-//
-// ant.mkdir(dir:"${basedir}/griffon-app/jobs")
-//
View
@@ -1,27 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import griffon.gdsl.GdslUtils
-
-/**
- * @author Andres Almiray
- */
-
-contributor(context(scope: scriptScope())) {
- if(!GdslUtils.isGriffonArtifactNotResource(classType)) return
-
- method name: 'lwjglCanvas', type: 'griffon.lwjgl.opengl.LWJGLCanvas'
-}
@@ -71,7 +71,7 @@ class LWJGLCanvas extends AWTGLCanvas {
if(autoSwapBuffers) swapBuffers()
}
- protected void update(Graphics g) {
+ public void update(Graphics g) {
super.update(g)
if(onUpdate) {
onUpdate.delegate = this

0 comments on commit d381590

Please sign in to comment.