Excellent news! I think the plan is good, but I don't have any insight for the graft issue.
Le 14 mars 2026 00:56:01 GMT+01:00, tarcv <[email protected]> a écrit : >Hello, >After almost a year of effort I finally have Gradle 4.5.1[1] bootstrapped just >from the sources and passing most of its unit tests (excluded are tests >requiring additional dependencies or not compatible with build >containerization), along with some notable dependencies like Spock 2 test >framework and half of JUnit 5 test framework - >https://github.com/TarCV/gradle-guix . Still, I had to exclude some >dependencies and remove some features from Gradle to limit scope of this >effort. Namely, nothing depending on IntelliJ, Kotlin[2], Scala, Play!, and >JRuby is included, also some smaller dependencies required just for >unit/integration tests are excluded along with the tests. >I want to contribute these build receipts to Guix. So my plan is to implement >more or less the following steps as PRs: >* Fix Groovy to be compiled to 1.8 bytecode (as it is defined in the upstream, >see https://github.com/apache/groovy/blob/GROOVY_3_0_5/build.gradle#L79) to >allow calling Groovy without requiring JDK 10+ >* Fix Groovy JDK enhancements not working because some resources are missing >in Groovy JARs >* Merge Groovy JARs where the upstream release doesn't have separate JARs. >Otherwise, groovy-ant is broken and Gradle requires hacks to make its >dependency on Groovy work. >* Make groovy-test visible >* Fix Plexus Container metadata in maven-3.0-model-builder >* Update AssertJ package (or create a new package for a newer version) >* Replace install phases with install-from-pom.xml for all packages Gradle >depends on >* Contribute the remaining dependencies and Gradle >Please correct me if some of the above ideas are wrong courses of action. > >Also, I'm not sure about these things and would be glad if someone can help >with them: >* On my machine Guix can't download Maven Polyglot (version by Sonatype) from >SWH, see https://codeberg.org/guix/guix/issues/3590 , so I had to set the >package source URL to a random fork having the required commit. Not sure how >to debug this. >* Grafting breaks JARs containing native binaries (because grafting patches >store paths in these binaries but doesn't patch CRCs to match) and breaks JARs >built from grafted inputs or inputs having dependencies on grafted inputs >(because grafting patches store paths in META-INF/INDEX.LST but doesn't patch >its CRC to match). Is there some workaround/fix for this? > >[1] 4.5.1 is the newest version not having a lot of Kotlin DSL build scripts >or sources. Also, a disclaimer: my build receipts don't work with grafting >enabled, see the last paragraph for why. >[2] I was able to build Kotlin up to 1.1.2-5 following and continuing Emmanuel >Bourg's and Julien Lepiller's steps, see https://github.com/TarCV/kotlin-guix. >However, I don't think contributing these build receipts to Guix is a good >idea. Building Kotlin this way requires hundreds of patches and takes half a >day on my machine. Instead, I want to try to transpile core Kotlin compiler to >Java. > >Regards, >Constantine Tarasov >
