Emmanuel Bourg pushed to branch master at Debian Java Maintainers / 
gradle-debian-helper


Commits:
5099734e by Emmanuel Bourg at 2026-10-23T11:33:39+02:00
Resolve the plugins of the plugins {} blocks from /usr/share/maven-repo

- - - - -
5bc1fb02 by Emmanuel Bourg at 2026-10-23T12:02:08+02:00
Depend on gradle (>= 4.7) and libgradle-kotlin-dsl-java (>= 0.16.3)

- - - - -
5a0480f3 by Emmanuel Bourg at 2026-10-23T12:02:36+02:00
Upload to unstable

- - - - -


3 changed files:

- debian/changelog
- debian/control
- gradle-helper-plugin/src/main/java/org/debian/gradle/DebianHelperPlugin.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gradle-debian-helper (3.1) unstable; urgency=medium
+
+  * Resolve the plugins of the plugins {} blocks from /usr/share/maven-repo
+  * Depend on gradle (>= 4.7) and libgradle-kotlin-dsl-java (>= 0.16.3)
+
+ -- Emmanuel Bourg <[email protected]>  Fri, 23 Oct 2026 12:02:30 +0200
+
 gradle-debian-helper (3.0) unstable; urgency=medium
 
   * Ignore the configuration blocks listed in debian/gradle.ignoreRules


=====================================
debian/control
=====================================
@@ -18,8 +18,8 @@ Package: gradle-debian-helper
 Architecture: all
 Depends:
  default-jre-headless | java7-runtime-headless,
- gradle (>= 4.6-2~),
- libgradle-kotlin-dsl-java (>= 0.15.6-2~),
+ gradle (>= 4.7),
+ libgradle-kotlin-dsl-java (>= 0.16.3),
  maven-repo-helper,
  ${misc:Depends}
 Description: Helper tools for building Debian packages with Gradle


=====================================
gradle-helper-plugin/src/main/java/org/debian/gradle/DebianHelperPlugin.java
=====================================
@@ -27,6 +27,7 @@ import org.gradle.api.Plugin;
 import org.gradle.api.Project;
 import org.gradle.api.Task;
 import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
+import org.gradle.api.initialization.Settings;
 import org.gradle.api.invocation.Gradle;
 import org.gradle.api.tasks.javadoc.Javadoc;
 import org.gradle.external.javadoc.StandardJavadocDocletOptions;
@@ -58,6 +59,24 @@ public class DebianHelperPlugin implements Plugin<Gradle> {
             }
         });
 
+        // resolve the plugins requested in the plugins {} blocks from the 
Debian repository
+        gradle.settingsEvaluated(new Action<Settings>() {
+            @Override
+            public void execute(Settings settings) {
+                log.info("\tAdding Debian repository to the plugin 
repositories");
+                MavenArtifactRepository repository = 
settings.getPluginManagement().getRepositories().maven(new 
Action<MavenArtifactRepository>() {
+                    @Override
+                    public void execute(MavenArtifactRepository repository) {
+                        repository.setName("Debian Maven Repository");
+                        repository.setUrl("file:/usr/share/maven-repo/");
+                    }
+                });
+                // the repositories declared by the build come after
+                
settings.getPluginManagement().getRepositories().remove(repository);
+                
settings.getPluginManagement().getRepositories().addFirst(repository);
+            }
+        });
+
         // ignore the configuration blocks listed in debian/gradle.ignoreRules
         final Set<String> ignoredExtensions = 
IgnoreRules.read().getIgnoredExtensions();
         gradle.allprojects(new Action<Project>() {



View it on GitLab: 
https://salsa.debian.org/java-team/gradle-debian-helper/-/compare/7695dd78520b8c5e52b0cd8605ec2f762c8cd784...5a0480f3e6513da2f8653cef99489bb05dbb3887

-- 
View it on GitLab: 
https://salsa.debian.org/java-team/gradle-debian-helper/-/compare/7695dd78520b8c5e52b0cd8605ec2f762c8cd784...5a0480f3e6513da2f8653cef99489bb05dbb3887
You're receiving this email because of your account on salsa.debian.org. Manage 
all notifications: https://salsa.debian.org/-/profile/notifications | Help: 
https://salsa.debian.org/help


_______________________________________________
pkg-java-commits mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to