home.social

#gradle — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #gradle, aggregated by home.social.

  1. [Перевод] Тестовые фикстуры: управление зависимостями в Gradle

    В многомодульных Gradle-проектах рано или поздно появляются вспомогательные классы для тестов: фабрики тестовых данных, билдеры, хелперы. Такие классы не относятся ни к продакшн-коду, ни к обычным тестам. Логично было бы переиспользовать их сразу в нескольких модулях, но классическая модель Gradle этого не позволяет: тестовые артефакты одного проекта нельзя просто так подключить как зависимость в другом. На самом деле Gradle умеет решать эту задачу из коробки без вспомогательных проектов и хитрых конфигураций. Начиная с версии 5.6, тестовые фикстуры стали в Gradle полноценной сущностью первого класса, и весь этот пласт боли можно убрать буквально несколькими строчками в build.gradle. Плагин java-test-fixtures заводит в модуле отдельный SourceSet, а другие модули подключают эти классы через лаконичный DSL. При публикации Gradle даже собирает отдельный *-test-fixtures.jar для независимых проектов. В статье на примерах показано, как расшарить тестовые хелперы между модулями, избавиться от дублирования и при этом сохранить чистые архитектурные границы. Если вы устали таскать тестовый код из модуля в модуль, то Вам точно пригодится.

    habr.com/ru/companies/spring_a

    #gradle #dependencies #java #kotlin

  2. 🚀 Google KSP 2.3.10 is here!

    Highlights:
    • OOM fix for coroutine dispatcher threads
    • Kotlin 2.4.0 compatibility
    • Better incremental compilation
    • AGP 9 R-class fix
    • Improved build & remote cache reliability

    github.com/google/ksp/releases

    #Kotlin #AndroidDev #KSP #Gradle

  3. 🚀 KSP 2.3.8 released

    Highlights:
    ✅ KEEP 402 annotation use-site rules enabled
    ✅ Gradle project isolation enabled by default
    ✅ Faster getSymbolsWithAnnotation with PSI-based resolution

    🔗 github.com/google/ksp/releases

    #Kotlin #AndroidDev #KSP #Gradle

  4. Working on an minecraft mod and wanting debugging it in vscode and it only fails over it's own feets.

    Not only does it generate & use it's own build cache (bin/... instead of gradle's build/...), in doing so it just copies all resources and dosn't executes the processResources step correctly which messes up my mod metadata (i use expansion in it for version numbers) so the loader interprets ${minecraft_version} as an version requirement it obviously can't validate, like ever.

    Fixing that took a while, but then it dosn't even finds LWJGL anymore. Looking further through the 108 entry classpath (cries in java), I've found out for some idiotic reason, does vscode picks up TWO instances of lwjgl! 3.2.2 AND 3.3.2. And only the later is the the correct one! So I've now also need to filter out all wrong lwjgl components from the classpath before putting it back together. Espc hart since the arguments are given to the exec command as a file.

    So yeah, time for another hastly thrown together ruby script to sort this mess...

    #java #minecraft #fabricmc #neoforged #gradle #lwjgl

  5. Working on an minecraft mod and wanting debugging it in vscode and it only fails over it's own feets.

    Not only does it generate & use it's own build cache (bin/... instead of gradle's build/...), in doing so it just copies all resources and dosn't executes the processResources step correctly which messes up my mod metadata (i use expansion in it for version numbers) so the loader interprets ${minecraft_version} as an version requirement it obviously can't validate, like ever.

    Fixing that took a while, but then it dosn't even finds LWJGL anymore. Looking further through the 108 entry classpath (cries in java), I've found out for some idiotic reason, does vscode picks up TWO instances of lwjgl! 3.2.2 AND 3.3.2. And only the later is the the correct one! So I've now also need to filter out all wrong lwjgl components from the classpath before putting it back together. Espc hart since the arguments are given to the exec command as a file.

    So yeah, time for another hastly thrown together ruby script to sort this mess...

    #java #minecraft #fabricmc #neoforged #gradle #lwjgl

  6. @mistergibson @henrycatalinismith If you JRuby with Gradle, the Simplified JRuby Gradle plugin now has support for this (as from 2.2.0).

    Just replace `ruby.gems()` with `ruby.coop()`.

    #ruby #jruby #gradle

  7. @mistergibson @henrycatalinismith If you JRuby with Gradle, the Simplified JRuby Gradle plugin now has support for this (as from 2.2.0).

    Just replace `ruby.gems()` with `ruby.coop()`.

    #ruby #jruby #gradle

  8. @mistergibson @henrycatalinismith If you JRuby with Gradle, the Simplified JRuby Gradle plugin now has support for this (as from 2.2.0).

    Just replace `ruby.gems()` with `ruby.coop()`.

    #ruby #jruby #gradle

  9. @mistergibson @henrycatalinismith If you JRuby with Gradle, the Simplified JRuby Gradle plugin now has support for this (as from 2.2.0).

    Just replace `ruby.gems()` with `ruby.coop()`.

    #ruby #jruby #gradle

  10. @mistergibson @henrycatalinismith If you JRuby with Gradle, the Simplified JRuby Gradle plugin now has support for this (as from 2.2.0).

    Just replace `ruby.gems()` with `ruby.coop()`.

    #ruby #jruby #gradle

  11. Компилируем компилятор или ускоряем javac вдвое

    Ну блин короче :-) Знаете ли вы, куда уходит время и ресурсы при сборке проектов на Java? Сейчас покажем и расскажем, как сберечь время, нервы и кофе. Мы ускорили javac вдвое и теперь можно экономить на сборке.

    habr.com/ru/companies/axiomjdk

    #javac #java #компилятор #aot #axiom_nik #jdk #gradle #maven #axiom_jdk

  12. With Java 23 (released today) you can import all classes of a Module in one statement. E.g.:

    import module java.base;

    I wonder if this will lead to more awareness of the Java Module System (JPMS).

    With Gradle, using our GradleX plugins, you can create quite neat JPMS-based project setups nowadays.

    Examples:
    - github.com/jjohannes/java-modu
    - github.com/jjohannes/gradle-pr

    Playlists on the topic: youtube.com/playlist?list=PLWQ

    #Java #Java23 #Gradle #GradleX #JPMS

  13. With Java 23 (released today) you can import all classes of a Module in one statement. E.g.:

    import module java.base;

    I wonder if this will lead to more awareness of the Java Module System (JPMS).

    With Gradle, using our GradleX plugins, you can create quite neat JPMS-based project setups nowadays.

    Examples:
    - github.com/jjohannes/java-modu
    - github.com/jjohannes/gradle-pr

    Playlists on the topic: youtube.com/playlist?list=PLWQ

    #Java #Java23 #Gradle #GradleX #JPMS

  14. With Java 23 (released today) you can import all classes of a Module in one statement. E.g.:

    import module java.base;

    I wonder if this will lead to more awareness of the Java Module System (JPMS).

    With Gradle, using our GradleX plugins, you can create quite neat JPMS-based project setups nowadays.

    Examples:
    - github.com/jjohannes/java-modu
    - github.com/jjohannes/gradle-pr

    Playlists on the topic: youtube.com/playlist?list=PLWQ

    #Java #Java23 #Gradle #GradleX #JPMS

  15. With Java 23 (released today) you can import all classes of a Module in one statement. E.g.:

    import module java.base;

    I wonder if this will lead to more awareness of the Java Module System (JPMS).

    With Gradle, using our GradleX plugins, you can create quite neat JPMS-based project setups nowadays.

    Examples:
    - github.com/jjohannes/java-modu
    - github.com/jjohannes/gradle-pr

    Playlists on the topic: youtube.com/playlist?list=PLWQ

    #Java #Java23 #Gradle #GradleX #JPMS

  16. With Java 23 (released today) you can import all classes of a Module in one statement. E.g.:

    import module java.base;

    I wonder if this will lead to more awareness of the Java Module System (JPMS).

    With Gradle, using our GradleX plugins, you can create quite neat JPMS-based project setups nowadays.

    Examples:
    - github.com/jjohannes/java-modu
    - github.com/jjohannes/gradle-pr

    Playlists on the topic: youtube.com/playlist?list=PLWQ

    #Java #Java23 #Gradle #GradleX #JPMS

  17. RT @[email protected]

    Still have some slots open for July, August & September.

    Do you need training in #DevOps, #Gradle, or #agiletesting?

    I also have some practical on-site consulting available to improve your build system and delivery pipelines.

    (RTs appreciated).

    🐦🔗: twitter.com/ysb33r/status/1150