I'm attempting to get cordova-android to build with Gradle, and I have
generally been successful, but now that it's time to commit this into the
repository, I think I've run into a conflict with Apache policies.

In order to be as simple to use as possible, Gradle is usually run from a
wrapper script, "gradlew", which they recommend that you check into source
control with your project. Running this wrapper takes care of downloading
the correct version of gradle, as well as any of its dependencies, such as
plugins, for building the code. This solves a lot of the problems involved
with setting up a working build system.

But Gradle is a Java project, and so the script invokes Java, and makes use
of a bundled .jar file, and therein lies the problem: We're not supposed to
be including compiled JAR files in our repository.

In this case, the .jar isn't actually part of our code; it's just used by
the build, and including it makes it closer to trivial for developers to
start building Cordova projects. It's easy to recreate, too, once you have
Gradle installed, it's as easy as running "gradle wrapper" to get it to
rebuild the wrapper, jar and all. The catch is that you already have to
have gradle installed for that to work. Egg, meet chicken.

Is there any way (and I'm reaching out the ASF folks here, as well) that we
can include this in the project, to make our developers' lives better?
Gradle itself is Apache-licensed, but including its source code instead
won't actually help anyone. Perhaps if we include full instructions for
recreating the wrapper, or for downloading, installing and configuring
gradle as well, for those that want to do it the hard way?

Thanks,
Ian

Reply via email to