Access dependencies from different gradle project in Java
gwitsch: I did try the APIs org.gradle.api.Project.findProject(String path) and org.gradle.api.Project.project(String path) however both return null for the path to ProjectB. These are only relevant...
View ArticleCreate module using command line
This is functionality entirely provided by IntelliJ. It is not calling a Gradle command. Just creating a module is very simple though. You only have to add include '1_herhaling' to settings.gradle....
View ArticleDump stack trace for tests
Is there a way to dump stack trace of VM in certain tests? My tests only fail when ‘all’ run at once so I need to run them all and dump 1 test’s stack trace after it starts 20 seconds in or so to see...
View ArticleWhen are gradle task inputs evaluated?
When does Gradle evaluate inputs of tasks? - I couldn’t find it anywhere. In my particular case, I would like to have a guarantee that the inputs of my task are evaluated after all of it’s task...
View ArticleDefine task in apply from script
I’m trying to define a task in a script included with apply from task uploadBom (type: io.github.httpbuilderng.http.HttpTask) { ... But this yields the error Could not get unknown property 'io' for...
View ArticleDefine task in apply from script
Your included script has a different classloader to build.gradle. You can do this: build.gradle ext { HttpTask = io.github.httpbuilderng.http.HttpTask } apply from: 'other.gradle' other.gradle task...
View ArticleAccess dependencies from different gradle project in Java
Thanks, I’ve already thought about setting up a multi-project-build for this.
View ArticleGet duration of a task in java
So since no one had an answer for me, I finally figured it out by myself. In case anyone else needs this, here’s my solution, might be not the best one but it works for me. Just add this Listener to...
View ArticleWhen are gradle task inputs evaluated?
See Project.files(…) where you can use a Task as the source for a FileCollection A Task . Converted to the task’s output files. The task is executed if the file collection is used as an input to...
View ArticleGet up-to-date status of a task in java
Hey there, I’m using the Gradle tooling API (org.gradle.tooling) in java and I’m trying to get the up-to-date status of the tasks of a build. I know there’s a org.gradle.api.tasks which can provide...
View ArticleI can't gradlew my new project
enviroment: android studio 3.5.1 distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip classpath ‘com.android.tools.build:gradle:3.5.1’ I created a new empty project,and i...
View ArticleI can't gradlew my new project
It seems my android studio is broken,because it can’t run any project now.Should I re-download it?
View ArticleTransfer Plugin Ownership (published with wrong user)
Hi there, can you please transfer ownership of https://plugins.gradle.org/plugin/de.europace.gradle.artifact-version from my account to the user europace? In fact, the whole de.europace namespace...
View ArticleWhy do WARs have no dependencies with maven-publish
@geissld the metadata should only carry the information about what is needed to build/run the component. By default, the war packages the dependencies, so no external dependencies are needed. I think...
View Articlegradle: tar task not creating a tar.gz
Hi I have a tar task that I made after looking at numerous methods and some SO posts. task buildDist(type: Tar, dependsOn: jar) { print 'here' archiveName = 'xyz-' + version destinationDir =...
View ArticleShort way to run gradle task on subproject
(original question on SO: https://stackoverflow.com/questions/58201803/short-way-to-run-gradle-task-on-subproject) So, using gradle 5.6.1, I have a project with several nested modules/projects: root...
View ArticleGradle control transitive from dependency build.gradle
I’m not sure if this is feasible, but wanted to get some comments/solution for the problem. I’m creating a new dependency com.example:app-dep:1.0.1 will be used in com.example:app as compile...
View Article[Question] Can a plugin dependency version be included in a pre-compiled script
Expected Behavior I am using the kotlin-dsl plugin to build a pre-compiled script plugin that depends on the artifactory plugin as shown below. What I would expect is that the version of the...
View ArticleGradle fetches stale snapshots from Maven repo if artifacts have a unique...
I wanted to ask before I report this as a bug. I have a Maven repository to which artifact snapshots are deployed with the Maven option uniqueVersion=true (see here). This means the...
View ArticleConfiguration Plugin vs. Task
I see that the plugin object can be configured via its plugin extension and that tasks can be configured via the bean methods. Do you have any guidelines as to when they are suitable?
View Article