Hi team, would it be possible to clarify the licen...
# contributing
v
Hi team, would it be possible to clarify the license for https://plugins.gradle.org/plugin/com.gradle.plugin-publish? I am wondering if it is something that can be included in Linux distribution such as Debian or it is under proprietary license?
👀 1
e
it's proprietary, source isn't available
v
Thank you!!!
m
Source is available IIRC if you download the source artifact
But curious about the license as well
No license inside 😞
e
oh you're right, it is
there's no license in the POM either though
j
I could not locate a public source repository. The binary plugin comes with an embedded Apache 2.0 license, but the source code that can be downloaded from the plugins portal has neither copyright nor license information.
o
+ @Louis Jacomet @Christoph Obexer @Vladislav Chesnokov @Margaret Wheeler @Bo Zhang as plugin owners
l
We need to do better here. Thanks for the feedback. That code is not OSS because it lives, for historical reasons, in a repo with other code. However, I am curious as to why a Gradle plugin would be included in a Linux distro?
v
Then why do you publish sources? 😄
j
However, I am curious as to why a Gradle plugin would be included in a Linux distro?
About Gradle plugins in general: • they could be needed to build other packages, and the distribution policy for
main
packages is to build them only with what is already packaged (this is to ensure that all the sources needed to build all the projects, including dependencies, are packaged and distributed) • some users are working offline, without direct access to the Internet, and may not maintain internal maven repository mirrors (or may not be able to use them for all their pipelines and deployments) This specific plugin is rather low priority but can still be useful as a package for some use cases
l
> Then why do you publish sources? Oh man, I should know better and not answer Slack messages that early on a Monday. 🤦 That code is not OSS While I wrote it, definitely not meant that. What I meant: • The publish plugin is Apache 2 licensed and is OSS. However its code is not in a public repository for the historical reasons I mentioned. We will take a look at adding the right licenses to all the artifacts published so it is clear. However making the code accessible never made it to the top of the priority list.
👍 1
👌 2
v
> However, I am curious as to why a Gradle plugin would be included in a Linux distro? The distro requires us to build sources using only what is already included in the distro. Gradle by design does not give us ability to exclude plugins and provided extensions that are not included in the distro. So we are left with options either to package plugins that we do not need or patch build scripts (and keep maintaining the patches).
v
While building a Gradle-based project for Debian you anyway practically always have to completely rewrite the build as it only contains Gradle 4.4.1 due to the imho overly strict FOSS definition and the maintainers not being able to get newer versions of Gradle built according to Debian rules it seems. 🤷‍♂️
j
overly strict FOSS definition
It's not really a problem of FOSS compliance here, it's more a matter of conflicting goals/approaches between both projects, and also between Debian policies and usual practices in the Java world. Debian cares a lot about stability, reproducibility and (to some extent) bootstrappability. Gradle, not so much (it improved a bit, but the 4.x to 6.x era was really chaotic).
newer versions of Gradle
FI Vladimir and me are currently working on getting newer Gradle (and Kotlin) releases in Debian. What makes this complicated (and a lot of work) are the cross-dependencies between Gradle (which needs Kotlin to build), Kotlin (which needs Gradle and some IDEA libraries to build), and IDEA (which formerly needed IDEA and now needs Bazel, which we don't yet have in Debian, to build). And the set of dependencies all these need, which often need Gradle and Kotlin to build. And yes, in a few cases this means that we have to downgrade (or rewrite, or write) build scripts so they work with the "current" Gradle in Debian (still 4.4.1 right now) in order to transition to newer releases.
v
It's not really a problem of FOSS compliance here, it's more a matter of conflicting goals/approaches between both projects, and also between Debian policies and usual practices in the Java world. Debian cares a lot about stability, reproducibility and (to some extent) bootstrappability.
Hm, ok, what I understood is, that Debian rejects to package anything that is not built with tools that are built by Debian already or are built from source. So even if the tools used to build a project is fully FOSS like Gradle, they reject to build something that is using Gradle >4.4.1 as Gradle 4.4.1 is not packaged in Debian and Gradle >4.4.1 is not packaged in Debian as newer version does not build with that Gradle 4.4.1 version but needs some intermediate Gradle build to build as Gradle extremely dog-feeds. So you would probably build newer Gradle versions in several steps to first build the version needed for the target version, and before the version to build that version, and before the version to build that version, ..... 🤷‍♂️
I hope your efforts will finally lead to new versions of Gradle in Debian, to also get newer other projects packaged to Debian. 🙂
🙏 1
➕ 1
j
build the version needed for the target version, and before the version to build that version
This is a common strategy known as the "treasure trail" approach, but for Gradle 8 (and Kotlin 2) I'm planning something else (as we are catching up too many releases and that would be a lot of work): use Gradle to generate a plain old
Makefile
that can be shipped in the source package and used to build the project on a system that doesn't yet have a newer Gradle installed.
v
I wonder whether it is really a good idea to build it differently and then Gradle gets error reports for things that are caused by building it differently on Debian. Doesn't sound like this is a good idea regarding reproducability an clarity. 🤷‍♂️
j
That's only for bootstrapping the build actually: we build a local Gradle with
make
and then we use that build to rebuild itself, and then the result of that rebuild to rebuild itself again, and then we check that the last two sets of produced binaries are identical. We also plan (later though) to run the test suites, and minimize and document the functional divergences between our builds and the upstream binary distribution. Anyway Debian users are encouraged to report all bugs to Debian and let the package maintainers forward them to the upstream project when necessary.
🙌 1
👀 1
v
Oh, I see. Interesting strategy. Could still be "wrong" if the make-made build produces a result that is different and that different result produces the same different result which is then identical but still different from upstream. 😄 But hopefully it is good enough.
Anyway Debian users are encouraged to report all bugs to Debian and let the package maintainers forward them to the upstream project when necessary.
That only partially works though. Especially as Gradle (unless you change that in the Debian build) hints for every failed build to ask in the forums or community or report a bug. You don't want to know how often people ask "why is wrong" when the output clearly states that there is a compilation error in their own code. 😕 But actually from users using Gradle on Debian I anyway expect them to not use the shipped Gradle version except maybe to bootstrap a new build, because imho every build that does not use the Gradle wrapper has a build-bug. 😄
treasure trailing will just need 462 steps, what's the problem? 😄
j
unless you change that in the Debian build
That's something I'm considering, yes. There are some frictions with other projects due to modifications that are specific to Debian, or even just shipping "outdated" versions ...
I anyway expect them to not use the shipped Gradle
It's likely that most developers will stick to the usual practices of the Java scene and other Gradle projects. In Debian, we actually remove these wrappers (and other pre-built binaries) from source packages.
v
Yes, that's what I meant. Typical user would probably follow Gradle best-practice and thus not use that Debian-packaged version. And package maintainers that change sources to not use the wrapper but Debian-packaged versions should hopefully be aware to complain to you first before heading to Gradle or the Gradle community. 🙂
e
I'm not sure if the Gradle build is reproducible enough but if the Debian build is bit-for-bit identical to the Gradle binary distribution then you'd have confidence it has the same behavior too
j
The Debian build will definitely be different than the Gradle binary distribution, but we expect to be able to explain all the differences, minimize and document the functional differences (and later successfully run the test suites), and of course rebuild the Debian package perfectly reproducibly (this is currently the case with the
4.4.1
package).
p
Debian Build what that now .....
v
Debian packages from the Debian-official repositories that you install on Debian are never using prebuilt binaries, but they build the packages from source and have some additional constraints. So if you install the "gradle" Debian package, you are not getting the official Gradle-built release, but one built by the respective Debian package maintainer built according to Debian rules. Because of that you currently also only getting Gradle 4.4.1 that way and the folks in this thread try to change that so that a newer version is available.
👆 2