Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.java > #12403

Re: Help With Gradle-plugin-protobuf Update

Path csiph.com!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Markus Koschany <apo@debian.org>
Newsgroups linux.debian.maint.java
Subject Re: Help With Gradle-plugin-protobuf Update
Date Sat, 09 Jul 2022 12:50:01 +0200
Message-ID <EHgc9-abmX-3@gated-at.bofh.it> (permalink)
References <EH1Zv-a2Wu-5@gated-at.bofh.it>
X-Mailbox-Line From debian-java-request@lists.debian.org Sat Jul 9 10:43:16 2022
Old-Return-Path <apo@debian.org>
X-Amavis-Spam-Status No, score=-10.773 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, CAPINIT=0.5, FOURLA=0.1, LDO_WHITELIST=-5, PGPSIGNATURE=-5, SARE_MSGID_LONG40=0.637, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_MX=-3.1 (check from: .debian. - helo: .hesinde.koschany. - helo-domain: .koschany.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=0; rate: -4.6
Content-Type multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-W0tIqqttqK+aIzqQPtqb"
MIME-Version 1.0
Authentication-Results ORIGINATING; auth=pass smtp.auth=apo@gambaru.de smtp.mailfrom=apo@debian.org
X-Mailing-List <debian-java@lists.debian.org> archive/latest/23041
List-ID <debian-java.lists.debian.org>
List-URL <https://lists.debian.org/debian-java/>
List-Archive https://lists.debian.org/msgid-search/688525110690a6f20247425efbd60c7f0563780e.camel@debian.org
Approved robomod@news.nic.it
Lines 105
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc android-tools-devel@alioth-lists.debian.net
X-Original-Date Sat, 09 Jul 2022 12:42:59 +0200
X-Original-Message-ID <688525110690a6f20247425efbd60c7f0563780e.camel@debian.org>
X-Original-References <ba0a6451-0506-8c1b-ea25-3a5e00c71ae8@disroot.org>
Xref csiph.com linux.debian.maint.java:12403

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Sonnie,

Am Freitag, dem 08.07.2022 um 20:35 +0100 schrieb Nkwuda Sunday Cletus:
> Hi there.
> 
> I am a GSOC intern currently working with Debian Android-tools-team to 
> package and update Android sdk tools in Debian.
> 
> Currently I am attempting to package bundletool ( 
> https://github.com/google/bundletool ), but I am stuck because it 
> depends on a much more recent version of gradle-plugin-protobuf. I 
> attempted to update gradle-plugin-protobuf but couldn't. Please your 
> help will be very appreciated.
> 
> Find the details of my attempt and findings here: 
> https://salsa.debian.org/android-tools-team/admin/-/issues/51

I am currently working on a full Gradle update which includes some of the
artifacts like the kotlin-dsl-plugin and should enable us to package a newer
version of gradle-plugin-protobuf in the near future. However one of my
findings is that we should try hard to avoid pulling in even more Gradle
plugins or Gradle related dependencies. I don't think Gradle will ever be a
build system that fits into the Debian ecosystem and the more we make other
packages dependent on it the more problems we will face in the future.

Hence why I suggest you take a different path. A few months ago I have packaged
a new version of libthrift-java which you could use as a template for your own
project. [1]

libthrift-java usually requires Gradle as well. I simplified the packaging by
using our Debian standard tools javahelper and maven-repo-helper.

This should work for bundletool too. Looking at

https://github.com/google/bundletool/blob/master/build.gradle

we should have all the dependencies in Debian already, except of maybe
com.android:zipflinger and com.google.dagger.

Ignore all tests and test dependencies. Just use the src/main directory as your
upstream sources (and additionally archive/com/google/android/archive if this
is required for your project) and try to compile the Java code with jh_build
first. Add all the required dependencies to your CLASSPATH and you should get a
preliminary jar file. 

For the code in src/main/proto you will need the protobuf-compiler package
(already in Debian) and possibly libprotobuf2-java (also in Debian but an older
version). gradle-plugin-protobuf is just a wrapper around these tools. It
should be possible to do all this by hand in debian/rules when you call the
protoc command from protobuf-compiler. If you succeed you would get rid of
Gradle completely and dramatically simplify the packaging process for future
contributors.

If you have more questions, please feel free to ask on this list.

Regards,

Markus


[1] https://tracker.debian.org/pkg/libthrift-java

Back to linux.debian.maint.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help With Gradle-plugin-protobuf Update Nkwuda Sunday Cletus <sonnietech@disroot.org> - 2022-07-08 21:40 +0200
  Re: Help With Gradle-plugin-protobuf Update Markus Koschany <apo@debian.org> - 2022-07-09 12:50 +0200
    Re: Help With Gradle-plugin-protobuf Update Nkwuda Sunday Cletus <sonnietech@disroot.org> - 2022-07-10 01:20 +0200
  Re: Help With Gradle-plugin-protobuf Update Hans-Christoph Steiner <hans@guardianproject.info> - 2022-07-12 17:40 +0200
    Re: Help With Gradle-plugin-protobuf Update Nkwuda Sunday Cletus <sonnietech@disroot.org> - 2022-07-14 10:00 +0200

csiph-web