ANN: Gradle GAE Plugin

220 views
Skip to first unread message

Benjamin Muschko

unread,
Mar 17, 2011, 8:06:29 PM3/17/11
to Gaelyk
Hi,

Some people might already use Gradle for their Gaelyk builds so this
might be interesting to you. I implemented a Gradle Google App Engine
(GAE) plugin (http://bit.ly/fdy5fg) that provides tasks for uploading,
running and managing of Google App Engine Java projects. The
documentation describes setup and convention properties in detail. The
plugin is not limited to plain Java GAE projects. It can also handle
Gaelyk projects - please refer to the FAQ section. In particular the
plugin defines the following tasks:

- gaeCronInfo: Verifies and prints the scheduled task (cron)
configuration.
- gaeEnhance: Enhances DataNucleus classes by using byte-code
manipulation to make your normal Java classes "persistable".
- gaeLogs: Retrieves log data for the application running on App
Engine.
- gaeRollback: Undoes a partially completed update for the given
application.
- gaeRun: Starts a local development server running your project
code.
- gaeStop: Stops the local development server.
- gaeUpdateCron: Updates the schedule task (cron) configuration for
the app, based on the cron.xml file.
- gaeUpdateDos: Updates the DoS protection configuration for the app,
based on the dos.xml file.
- gaeUpdateIndexes: Updates datastore indexes in App Engine to include
newly added indexes.
- gaeUpdateQueues: Updates the task queue configuration (queue.xml) in
App Engine.
- gaeUpload: Uploads files for an application given the application's
root directory. The application ID and version are taken from the
appengine-web.xml file.
- gaeVacuumIndexes: Deletes unused indexes in App Engine server.
- gaeVersion: Prints detailed version information about the SDK, Java
and the operating system.

Please let me know if you have any feedback or feature requests. I'd
be happy to improve the plugin.

Cheers,

Ben

Guillaume Laforge

unread,
Mar 18, 2011, 4:24:32 AM3/18/11
to gae...@googlegroups.com
Wohhh :-O


--
You've received this message because you've subscribed to the Gaelyk Google Group.
To send an email to the group, please write to: gae...@googlegroups.com
To unsuscribe from this group: gaelyk+un...@googlegroups.com
To show more options: http://groups.google.fr/group/gaelyk?hl=en



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

Steven

unread,
Mar 25, 2011, 12:30:30 AM3/25/11
to Gaelyk
Sorry for my newbieness, but how do you install and use this plugin?

On Mar 17, 8:06 pm, Benjamin Muschko <benjamin.musc...@gmail.com>
wrote:

Benjamin Muschko

unread,
Mar 25, 2011, 7:43:32 AM3/25/11
to Gaelyk
Hi Steven,

Have a look at the README.md file on Github: http://bit.ly/fJzvvo. If
you need more information like a full build.gradle please let me know.

Ben

Steven Baker

unread,
Mar 26, 2011, 9:04:04 PM3/26/11
to gae...@googlegroups.com
Sorry I'm really new to gradle and git and just cant add one and one together on this.
Is there an example build.gradle file for gae?


Kind regards,
Steven

Steven

unread,
Mar 27, 2011, 3:04:36 AM3/27/11
to Gaelyk
Sorry, got it working. However I cant get the password (or
gaePassword) parameters to work. The gaeUpload task still always
prompts for a password.

Here is my config:
gae {
appcfg {
email = "baker.s...@gmail.com"
gaePassword = "xxxxxx"
password = "xxxxxx"
passIn = false
}
}


Any ideas? Is this part just not done yet?

Benjamin Muschko

unread,
Mar 27, 2011, 8:31:19 AM3/27/11
to Gaelyk
Steven,

Great! The version you are using (0.2) doesn't have the convention
property "password" yet. It has been implement on "mainline" so to say
but didn't get released yet. There's another feature I want to build
before I release version 0.3 including that property. Version 0.3 will
probably be released within the next two weeks. If you really, really
need the property right now you can download the source and build the
version yourself.

Thanks,

Ben

On Mar 27, 3:04 am, Steven <baker.steven...@gmail.com> wrote:
> Sorry, got it working. However I cant get the password (or
> gaePassword) parameters to work. The gaeUpload task still always
> prompts for a password.
>
> Here is my config:
> gae {
>     appcfg {
>         email = "baker.steven...@gmail.com"

Brice

unread,
Apr 5, 2011, 10:42:41 PM4/5/11
to Gaelyk
Ben,

I had to add a couple things that weren't in your README on github ...
first, to define sourceSets { main { groovy { ... } } } - I had to
apply plugin: 'groovy' - the War plugin only extends the Java plugin,
apparently ...

Then, to get the .gdsl file include from src/, I had to define a
sourceSets { main { resources { srcDir 'src' } } } - not sure if the
'groovy' sourceSet by default only picks up *.groovy files?

I haven't customized anything in my workspace from unzipping the
Gaelyk template project (0.6.1). I'm using Gradle 1.0-milestone-1.
Installed the locally compile (from GitHub clone) gradle-gae-plugin
(v0.2-7-gac7590d) to my local maven repo and added mavenLocal() to my
repositories instead of pulling the older release version from GitHub.

Awesome work on this plugin!!

-Brice

On Mar 27, 6:31 am, Benjamin Muschko <benjamin.musc...@gmail.com>
wrote:

Benjamin Muschko

unread,
Apr 6, 2011, 10:18:43 AM4/6/11
to Gaelyk
Hi Brice,

Thanks for your feedback. Most of the things I simply assumed the
Gradle user would already know. Especially, when it comes to applying
and configuring the Groovy plugin. The .gdsl is only used by IDEs
(describes the Gaelyk DSL) and is not required to be included in the
WAR file. However, if you have Groovy classes sitting in src then
you'd want to set the Groovy sourcedir. I will add all of that in the
next version of the plugin.

Ben

Brice Ruth

unread,
Apr 6, 2011, 2:43:54 PM4/6/11
to gae...@googlegroups.com
OK - or just add a couple lines in the README, wasn't too hard to figure out, but this was my first go at using Gradle for a Gaelyk app. Since a Gaelyk app will contain Groovy source, of course, it would make sense to have a Groovy sourceSet.

Brice Ruth, FCD
Software Engineer, Madison WI

Brice Ruth

unread,
Apr 6, 2011, 10:49:02 PM4/6/11
to gae...@googlegroups.com
Ben -

Am I missing something? When I do gaeRun, I get the output below, but I don't think Jetty is actually running ... 

:gaeRun
2011-04-06 21:43:27.020 java[12365:903] [Java CocoaComponent compatibility mode]: Enabled
2011-04-06 21:43:27.027 java[12365:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Apr 7, 2011 2:43:29 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Apr 7, 2011 2:43:29 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/bruth/Projects/ecotstat.gae/build/exploded-war/WEB-INF/appengine-web.xml
Apr 7, 2011 2:43:29 AM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/bruth/Projects/ecotstat.gae/build/exploded-war/WEB-INF/web.xml
Apr 7, 2011 2:43:29 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x

BUILD SUCCESSFUL

Thanks!
Brice Ruth, FCD
Software Engineer, Madison WI


On Wed, Apr 6, 2011 at 9:18 AM, Benjamin Muschko <benjamin...@gmail.com> wrote:

Wilson MacGyver

unread,
Apr 6, 2011, 10:51:22 PM4/6/11
to gae...@googlegroups.com
be sure to upgrade to the latest gae jdk if you are using OSX and JDK 1.6.0_24

--
Omnem crede diem tibi diluxisse supremum.

Brice Ruth

unread,
Apr 6, 2011, 10:57:49 PM4/6/11
to gae...@googlegroups.com
Well, yeah - I think I have that. 1.4.3, just grabbed that last night. I had 1.3.8 in my path previously and no difference in behavior. I'm not getting any errors anywhere that I can see .. is there a log hiding somewhere? I'll check my Console.app to be sure ...

Brice Ruth, FCD
Software Engineer, Madison WI


Brice Ruth

unread,
Apr 6, 2011, 11:01:00 PM4/6/11
to gae...@googlegroups.com
Whoa, Console.app - goldmine:

4/6/11 9:59:36 PM java[12509] [Java CocoaComponent compatibility mode]: Enabled
4/6/11 9:59:36 PM java[12509] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
4/6/11 9:59:44 PM ReportCrash[12510] Saved crash report for java[12509] version 1.0 (1.0) to /Users/bruth/Library/Logs/DiagnosticReports/java_2011-04-06-215944_Macbook2-2.crash

% java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)

Brice Ruth, FCD
Software Engineer, Madison WI


Wilson MacGyver

unread,
Apr 6, 2011, 11:07:02 PM4/6/11
to gae...@googlegroups.com
yea, since the OSX JDK 1.6.0_24 update, gae jetty would crash on startup.

the new GAE SDK fixes that.

Brice Ruth

unread,
Apr 6, 2011, 11:58:55 PM4/6/11
to gae...@googlegroups.com
Newer than 1.4.3, then?

Brice Ruth, FCD
Software Engineer, Madison WI


Brice Ruth

unread,
Apr 7, 2011, 12:06:51 AM4/7/11
to gae...@googlegroups.com
Just realized I have appengine-1.4.3 in my path & APPENGINE_HOME, but 1.4.2 is what's configured in Gradle. Rebuilding ...

Brice Ruth, FCD
Software Engineer, Madison WI


Brice Ruth

unread,
Apr 7, 2011, 12:07:36 AM4/7/11
to gae...@googlegroups.com
Worked!

Brice Ruth, FCD
Software Engineer, Madison WI


Benjamin Muschko

unread,
Apr 12, 2011, 7:48:08 PM4/12/11
to Gaelyk
Steven,

Version 0.3 of the plugin got released. You will now be able to set
the password. Please refer to the documentation for more information.

Ben

On Mar 27, 3:04 am, Steven <baker.steven...@gmail.com> wrote:
> Sorry, got it working. However I cant get the password (or
> gaePassword) parameters to work. The gaeUpload task still always
> prompts for a password.
>
> Here is my config:
> gae {
>     appcfg {
>         email = "baker.steven...@gmail.com"

Steven

unread,
Apr 13, 2011, 6:39:18 PM4/13/11
to Gaelyk
Worked :-D
Thanks heaps. This has greatly improved our ability to deploy.

On Apr 13, 9:48 am, Benjamin Muschko <benjamin.musc...@gmail.com>
wrote:

Brett Schuchert

unread,
Jan 10, 2012, 4:51:13 PM1/10/12
to gae...@googlegroups.com
Hello Ben,

I would love an example build.gradle file.

I've only toyed with gradle and I love it. However, I'm trying to see how to:
- Build (I've done that by hand actually, but I like the idea of your plugin much better)
- Run from the command line (your plugin does that)
- Create an eclipse project (nice to have)

If I can only run my unit tests in eclipse and use the command line to push the app out to the interwebs, that's cool.

The problem I have is, being a relative gradle noob, your readme seems to be missing some stuff for such a brain as mine)))

Give me a simple example, however, and I'm all over that.

I know this is /late/ compared to the timeline of this tread, but who knows.

In any case, thanks for building this plugin.

Brett

Benjamin Muschko

unread,
Jan 11, 2012, 7:06:28 AM1/11/12
to Gaelyk
Brett,

I guess this has been answered by my Twitter responses? Let me know if
you need additional help.

Ben
Reply all
Reply to author
Forward
0 new messages