Quantcast
Channel: Gradle Forums - Latest posts
Browsing all 19854 articles
Browse latest View live

How to override version only for test compile and running tests

Hi @deanhiller, If I understand correctly, you want to define a different Guava version in testing. Then you can set a constraint on testImplementation. Which will reflect in test compilation and...

View Article


How to best model dependencies between modules under the same topic?

Hi @ams_tschoening, Multi-projects is the preferred way in general. In theory composite builds might be suprior at some point in the future, but currently they still have some drawbacks. So I would...

View Article


Compile Groovy for lower Java versions

I have a Gradle project which I want to execute with Java 11. The project applies the Groovy plugin because it contains Groovy sources. Now the requirement is that the Groovy compiler emits Java 8...

View Article

Image may be NSFW.
Clik here to view.

Wrong groupId for dependencies - maven plugin

Hello everyone. Thanks in advance to take time to read this but my understanding about gradle subject is pretty low, but i am trying Well, i am trying to create my local repository in my machine. I...

View Article

Short-circuit dependency chain if task outputs exist

If you declare a file in inputs.files or outputs.files then gradle will ALWAYS consider the file(s) in the UP-TO-DATE checks. Adding an outputs.upToDateWhen {} closure does not stop the normal...

View Article


How to get custom task to run after a default task?

Your task has no task action, the exec call is executed during configuration phase. Furthermore, the mustRunAfter is superfluous because dependsOn is much stronger. This is maybe what you want:...

View Article

Composite build

Thank you so much bro!

View Article

Boolean dependency attribute problems in Kotlin DSL

I’m having the same problem, did you find a solution in the end?

View Article


How to copy a folder from a dependent External Library's jar into the gradle...

@jendrik thanks fro your reply! i tried this but it isn’t working -> My gradle project has an external dependency. I want to include a class file from external dependency into my gradle project’s...

View Article


Custom Gradle plugin crashes in Gradle v5.2.1, worked in v4.7?

I know that’s a HUGE version change. I wrote a custom Gradle java plugin, and created a task called manageVersion. Here’s the entry plugin class itself package com.zift.utilities; import...

View Article

What is the best way to debug gradle plugins?

I’m new to Gradle plugins too, and Java. But How to debug Gradle Plugins with IntelliJ helped.

View Article

How to specify a dependency on a third-party JAR+AAR cross-platform library?

Hi, I am trying to make a cross-platform (let’s say, desktop Linux + Android) Java library that uses JNA. JNA is packaged as a module with both a JAR and an AAR, and jar is specified as the default...

View Article

runtimeOnly configuration for variants

I’m trying to break down the dependencies of a project producing a monster-jar using feature variants, and I noticed that for each variant xxx we get only xxxImplementation and xxxApi configs....

View Article


Dynamic dependencies management : jar vs subproject

Hello, I have some constraints that I would like to solve by a dependency resolution logic like following : search for a jar ( local / artifactory / …) if not found declare the dependency as a...

View Article

Externilization of Maven repo credentials

buildscript is special form in Gradle DSL. You can’t write plugin that provides a structure for Maven repo settings there. For this reason I have very first lines: buildscript { ext.injectMavenRepos =...

View Article


Boolean dependency attribute problems in Kotlin DSL

Sorry, I didn’t find a solution. I didn’t look much for one as I wound up not using attributes. Good luck.

View Article

How to copy a folder from a dependent External Library's jar into the gradle...

I endeded up doing: it.name.contains(‘my-lib.jar’) and now it seems to be working.

View Article


BOM dependencies not resolved in custom configuration

Hi there, I’ve got a multi-project build, and in the root project I define a few configurations to aid with packaging. Using a BOM for constraints in all subprojects. subprojects { dependencies {...

View Article

Externilization of Maven repo credentials

You can define repos in an init.gradle script (equivalent of settings.xml for Maven) allprojects { repositories { maven { url "${url}" credentials { username = 'joe' password = 'secret' } } }...

View Article

Image may be NSFW.
Clik here to view.

How to make projects needing bytecode enhancement work in Eclipse (Buildship)?

Finding: the code IS getting enhanced but some Java builder re-runs and overwrites the enhancements with original code… without re-running the enhancement step again. I’ve confirmed this. Tried...

View Article
Browsing all 19854 articles
Browse latest View live