On 12/01/2015 10:31 AM, Roman Mohr wrote:
Ok, got it working
On Tue, Dec 1, 2015 at 8:43 AM, Roman Mohr <roman(a)fenkhuber.at> wrote:
> I am currently trying to package some java projects which use gradle and I
> am suck on how to use gradle in offline mode. The Java HOWTO says that I
> can use the gradle-local command which should be part of the gradle-local
> package. But at least on Fedora 22 there is no such command inside that
The gradle-local script is still missing, so no idea if it is needed. I
guess the intention of it is to add the xmvn() repository automatically if
no repositories section is in the build.grade file. Right?
Fedora 22 is old stable distribution. All development (ie. packagging)
should be done in rawhide first, so I'll describe how things are done
there. Gradle packaging automation is constantly improving and I don't
remember which features are in F22 and which are not.
Generic steps needed to use Gradle for building packages are described
Currently I would recommended using new %gradle_build macro (which is
not yet documented in Java packaging HOWTO). To do that you need to
replace step 2 in the above description with call to %gradle_build,
which takes the same parameters as %mvn_build.
> I also tried to build the packages then just with 'gradle -s
> see if this might already find the jars from other RPMs but that does not
> seem to be the case.
I added the xmvn() repo to the repositories section of the build.gradle
file and then it could detect the artifacts.
Adding xmvn() repo should't be necessary if you use gradle-local command
or %gradle_local macro.
Software Engineer, Red Hat