On Wed, Dec 2, 2015 at 5:08 PM, Mikolaj Izdebski <mizdebsk@redhat.com> wrote:
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@fenkhuber.at> wrote:
>
>> Hi,
>>
>> 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[1]. But at least on Fedora 22 there is no such command inside that
>> package.
>>
>>
> 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.

I tried it with rahwhide and F22. So I missed the one distribution (F23) with the gradle-local script.

 
Generic steps needed to use Gradle for building packages are described
at: https://fedorahosted.org/released/javapackages/doc/

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 --offline' to
>> 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.


Will give it a try.

 
--
Mikolaj Izdebski
Software Engineer, Red Hat
IRC: mizdebsk
--
java-devel mailing list
java-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/java-devel

Thanks for the help,

Roman