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

Gradle custom JavaCompile task for annotation processing

I am working on a gradle plugin that registers a JavaCompile task that should trigger an annotation processing process. Here is what I currently have private fun Project.runConfiguration(variants:...

View Article


Failed to notify build listener. > com/intellij/util/Consumer

After upgranding to Android Studio 3.6 i got this error: ERROR: Unable to load class ‘com.intellij.util.Consumer’. Possible causes for this unexpected error include: Gradle’s dependency cache may be...

View Article


Best practices on configure resources

at the moment we have one project configure with sourceSets { resources { srcDir generatedResourcesDir } } taskB { doLast { copy { stuff into generatedResourcesDir } } } jar { dependsOn taskB from...

View Article

Gradle ant task multiple/concatenated classpath

Hey. I’m trying to invoke hibernatetool as an ant task and I need to define classpath that in relevant ant build script is defined like: <taskdef name="hibernatetool"...

View Article

Best practices on configure resources

So the problem here is that you have the generated sources being added to the jar from two different places - once from the outputs of the processResources task and once from the output of taskB. This...

View Article


Download a third party jar and place it in the build directory

HI, How to download an internal jar and place it in the build directory in build.gradle.kts this is how I did in build.gradle configurations { customjar } dependencies {...

View Article

Gradle custom JavaCompile task for annotation processing

I have found a solution to what wrong was happening. JavaCompile task has to be aware of where is the processor we use. So the missing piece was these lines val classPath =...

View Article

Download a third party jar and place it in the build directory

You need to supply the path to that jar file if you’re not using maven. configurations { customjar } If you are in an Android setup then dependencies { classpath file('path/to/your/jar/libs/folder') }...

View Article


Get JavaCompile task to compile kotlin sources

I am working on a gradle plugin that defines a custom task that is of type JavaCompile so far I have this setup private fun Project.runConfiguration(variants: DomainObjectSet<out BaseVariant>) {...

View Article


Use dependency version from platform outside the dependencies clause

so sorry, I somehow missed your reply. my platform project is not a subproject, so I’m getting this error if I try to use your syntax (assuming my project is called P, my group called X and my...

View Article

How can I delete a file from inside a task?

I’m trying to make a custom task, written in Kotlin, that generates a file through a commandline command. The problem is that this the external commandline program can’t handle if the generated file...

View Article

How can I delete a file from inside a task?

try project.delete( files("${project.buildDir}/jpackageAppImage") ) Or define your own task task deleteMyFile(type: Delete) { paths files("${project.buildDir}/jpackageAppImage") }

View Article

Image may be NSFW.
Clik here to view.

How can I delete a file from inside a task?

The first one project.delete( files("${project.buildDir}/jpackageAppImage") ) Causes the same problem

View Article


How can I delete a file from inside a task?

this should work task myDeleteTask(type: Delete) { delete files("${buildDir}/jpackageAppImage") }

View Article

How can I delete a file from inside a task?

Running it as a separate task worked. However, I don’t want to have to remember to create a separate delete task every time I want to create an installer task....

View Article


How can I delete a file from inside a task?

For Delete task you need to comply with gradle Api that’s why you had to create a new task that overrides the Delete default task from gradle. if you want to register a task that works with install...

View Article

How can I delete a file from inside a task?

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

View Article


How can I delete a file from inside a task?

You can do as follows task installerTask() { //.... your task logic goes here doLast { delete("${buildDir}/jpackageAppImage") } }

View Article

How can I delete a file from inside a task?

For Delete task you need to comply with gradle Api that’s why you had to create a new task that overrides the Delete default task from gradle. So Project.delete() can only be used inside of tasks that...

View Article

Build only subprojects in a dynamic multi-module project

Found the same issue described here: https://github.com/gradle/kotlin-dsl-samples/issues/916 But, the resolution is not quite clear to me. Do we have another way to accomplish this?

View Article
Browsing all 19850 articles
Browse latest View live