Gradle Garmin plugin version 0.2.1

Former Member
Former Member

*** UPDATE: 5/19/20 Version 0.2.1 released ***

Hey everyone,

I've released version 0.1.0 of an open source plugin for building Garmin apps and barrels with Gradle! This initial version of the plugin enables integration of Garmin application (and barrel) projects with common Gradle commands like "gradle clean" and "gradle build". The plugin source and usage can be found on Github at: https://github.com/chesapeaketechnology/gradle-garmin. The README file should have enough to get started.

Also on its way very shortly is the ability to publish Garmin apps and barrels to maven repositories - both local and remote. The goal is to be able to reference a barrel dependency in normal dependency notation ("<groupid>:<artifactId>:<version>") and have Gradle pull the dependency in to your project and compile your app with it. I already have a PR up for this feature and will probably be released in version 0.2.0.

As time permits, I'm planning on adding Gradle tasks for running tests, installing to the device, and launching the emulator.

Hopefully this will be useful to some of you and let me know if there's any other features that you would like to see added.

Happy Coding!

  • How much have you used the CIQ Eclipse Plugin?  Based on what I see here,I think you're missing a fair about of functionality.

  • Former Member
    Former Member over 5 years ago in reply to jim_m_58

    Yep, there's a lot that I haven't integrated. As I mentioned, I'd like to incorporate more as time allows.

    I have used the Eclipse plugin, and it's one of the main reasons I decided to start a Gradle integration. My thought is, tying to a build tool allows you use any IDE of your choice. Also, tying to Gradle opens up a whole realm of build possibilities with integrations across the software ecosystem. One simple example is that I can now have my Android app and Garmin wearable app in the same project and build both with one command.

  • I have a feeling you're not really familiar with what all can be done in the eclipse plugin.  There's a lot more there than just source management  The whole "running" side - "run project A on target device B with a target SDK of C", and then things like the app settings editor, the debugger,  ERA, project templates, the SDK manager, etc.

  • Former Member
    Former Member over 5 years ago in reply to jim_m_58

    I'm definitely not claiming to be an expert by any means. However, having options with software development is always nice, wouldn't you agree? 

    I don't imagine this plugin replicating everything that Garmin does in Eclipse - Gradle is a build tool and it doesn't make sense to support project templates and the settings editor for example. 

    The point of this is, it's a first step with a build tool that supports things like publishing artifacts, and support for continuous integration (Jenkins). My hope is that the community will help contribute and then we can have an open-source tool that everyone can leverage.

    I think it's obvious that you don't see the value here and that's completely fine. Maybe others will? I know this has already helped me tremendously.

  • There have been a number of attempts to do "an alternative" to Eclipse over the last 5 years, and you'll notice there are none.

    I think the only ones that could do it would be the Garmin CIQ folks.

    With what you propose, It's pretty clear that Eclipse would still be needed (at least to make life MUCH easier!).  It's more than build management.  It's really a create/build/test environment.

  • Former Member
    Former Member over 4 years ago

    Hey Garmin gang, I'm back with some feature updates for the Gradle Garmin plugin. Version 0.2.1 has just been released into the wild with some pretty cool new features (if I say so myself :) ).

    Version 0.2.1

    New Garmin Integrations

    • App and Barrel testing: gradle test
    • Launch ConnectIQ application: gradle connectIQ

    New Build Integrations

    Publish Artifacts

    Applications and Barrels can now publish generated artifacts (PRG and Barrel files) to configured Gradle repositories. Publishing to your local maven repository is as easy as running: gradle publishToMavenLocal

    Remote repositories can also be configured for publishing:

    publishing {
        repositories {
            maven {
                // change to point to your repo, e.g. http://my.org/repo
                url = "$buildDir/repo"
            }
        }
    }

    To publish to a configured remote repo, run "gradle publish"

    Barrel Dependencies

    Published barrels can now be added as compile scoped dependencies with the "barrel" scope.

     barrel "com.test:artifact-name:0.1.0-SNAPSHOT@barrel"

    Barrel dependencies are automatically downloaded and added to the project's jungle file for compilation.

    --------------------------------

    If you are starting a new project from scratch and want to use the gradle plugin for development, I would still recommend creating the app/barrel in Eclipse to get the barebones project and then copying the files over to your Gradle project location. Or if you REALLY don't like Eclipse, I'm fairly certain that Eclipse just pulls the skeleton projects from the SDK location under "bin/templates", so you could just copy a base project from there.

    --James