[fedora-java] Gradle upgrade issues (#976330)
mizdebsk at redhat.com
Mon Oct 21 15:55:47 UTC 2013
On 10/21/2013 05:11 PM, Michael Ekstrand wrote:
> In bug #976330, there's been some discussion of the desire to
> upgrade Gradle from 1.0 to a new version (currently 1.8), and that
> there is significant hassle to actually do so. Some of this hassle I
> see in the bugs blocking 976330 - upgrading to Aether, newer Plexus
> containers, and maybe Polyglot Maven.
> What are the key issues that make it difficult to upgrade and maintain
> Gradle in Fedora? The likely ones I see:
> - Incompatible dependencies (Gradle may require package versions no
> longer shipped in Fedora)
Gradle used to use (very) old versions of some dependencies, for example
legacy pre-1.0 alpha version of Plexus, released ~10 years ago. It also
used some Maven 2 APIs (Fedora ships Maven 3 only). This was improved
Gradle also uses Sonatype Aether, which is not in Fedora any longer.
Porting it to Eclipse Aether should be fairly straightforward, but
still, needs to be done.
> - Bootstrapping problems (the Gradle 1.8 sources won't build with
> Gradle 1.8, they seem to require 1.7)
These are IMO two separate problems.
1. Gradle breaks compatibility between releases. If package builds with
Gradle version X then it not necessarily builds with Gradle version Y, Y
> X. This is a serious problem as Fedora may have to maintain multiple
versions of Gradle to build different projects. Other build systems may
have some incompatibilities too, but in case of Gradle they are causing
more problems. Additionally, Gradle build scripts are written in
fully-featured programming language and may not be so easy to port to
different version of Gradle.
2. Gradle is built with itself (as many build systems are), so it needs
bootstrapping. Upstream of majority of other build systems (including
Ant or Maven) are maintaining secondary ways of building them (Ant can
be built with javac, Maven can be built with Ant etc.), but Gradle
upstream does not provide any way to bootstrap Gradle. Normally
bootstrapping would need to be performed only once, but because of 1.
bootstrapping may be required more often, worst case with every release.
Fedora would probably need to create and maintain a separate build
script for Gradle (for example using Ant or Maven) or obtain an
exception from FPC to build using prebuilt binaries. Currently Fedora
ships Ant build.xml for Gradle, but it requires substantial amount of
manual work to synchronize it with upstream build. (I would prefer to
use Maven here. It would not only ease dependency management, but also
allow easier installation of Gradle artifacts.)
> - Possibly library embedding (although the Gradle sources do seem to
> pull in the dependencies from Maven)
That's a generic problem and it's not really Gradle-specific. But yes,
there are some version problems, most notably Objectweb ASM. Different
Gradle dependencies use versions 3 and 4 (shaded to avoid namespace
conflicts). Fedora does not allow bundled libraries, which causes
conflict between ASM 3 and 4. (Porting from ASM 3 to ASM 4 is possible,
but non-trivial as there were major changes. This would again require
To sum up, Gradle maintainence requires substantial amount of work.
Currently only few packages in Fedora are using Gradle which means that
maintenance costs of Gradle outweight costs of porting other packages to
different build systems.
PS. Integration of Gradle with Fedora is a completely different story...
More information about the java-devel