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

Standalone Plugin to apply and import 3rd party plugins

Thanks @jjustinic and @johnjohndoe , I publish the plugin as a jar to an artifact repo, and every user of the plugin applies it using the DSL. e.g. plugins { id “com.acme.java” version “1.0.0” } But...

View Article


In gradle multi-project buil, how to build single jar and publish it to maven?

After constantly trying, I wrote this configuration. buildscript { ext { internalDependencies = [ project(':public'), project(':server-public') ] } } apply plugin: 'maven-publish' apply plugin:...

View Article


Standalone Plugin to apply and import 3rd party plugins

This should, in theory, bring the dependency as well, but it doesn’t happen. No it should not. As I have said above in your plugin’s build.gradle file you should add the dependency. Then in your...

View Article

Ant taskdef jwsc/wsdlc/clientgen to Gradle Migration

I am new to Gradle and am trying to migrate components from Ant to Gradle 6.0. I ran into the following tags stopping. <taskdef name='wsdlc' classname='weblogic.wsee.tools.anttasks.WsdlcTask'>...

View Article

Update Gradle from 5.6.4 to 6.0.1 failed sync

After updating Gradle from 5.6.4 to 6.0.1, we faced the problem that settings.gradle.kts doesn’t see imports from buildSrc module. For reproducing this issue I have created the sample project. Gradle...

View Article


Image may be NSFW.
Clik here to view.

Handle on "sources jar" created by the Java plugin

Hi, As of Gradle 6 one can create source jars using the Java plugin as follows: java { withSourcesJar() } How can I get a handle on the generated sources jar? I wish to copy it to a different folder....

View Article

Update Gradle from 5.6.4 to 6.0.1 failed sync

Based on https://docs.gradle.org/current/userguide/upgrading_version_5.html#classes_from_buildsrc_are_no_longer_visible_to_settings_scripts we are not able to have a reference on buildSrc module. This...

View Article

Ant taskdef jwsc/wsdlc/clientgen to Gradle Migration

You can call ant from Gradle, try reading through the Gradle Ant documentation and apply it to your build and come back with further questions

View Article


tasks.withType(JavaCompile).findAll doesn't

I have the following task that is of type JavaCompile and I have a list of JavaCompile tasks. def compileTasks = project.tasks.withType( JavaCompile ).findAll{ task -> ‘compileJsp’ != task.name }...

View Article


tasks.withType(JavaCompile).findAll doesn't

TLDR; It’s an issue with the order of execution project.tasks returns a TaskContainer which extends DomainObjectCollection and Collection Some methods on the collection (eg withType(Class),...

View Article

Could not find withJavadocJar() and withSourcesJar()

When trying to use java { withJavadocJar() withSourcesJar() } to generate sources and javadoc, I get the following error: A problem occurred evaluating root project 'simple-cli'. > Could not find...

View Article

Gradle upgrade from 2.2 to 6.0

According to the stack trace, maybe the problem is in this plugin. I think there have been quite big changes between these two versions. Maybe it would be better to upgrade incrementally, i.e., to...

View Article

Jacoco global default thresholds / local modifications setup

We implemented this in a slightly simpler way. Shared coverage.gradle: jacocoTestCoverageVerification { violationRules { rule { element = 'CLASS' limit { minimum = 1 } } } } Project specific...

View Article


Image may be NSFW.
Clik here to view.

How child project can have root project as dependency?

For others who will encounter this problem. It seems that the IDEA has some auto-generate bug in projects organized in this way. First, open the “workspace.xml” file in yout project’s “.idea” folder...

View Article

Programmatically apply a plugin

Sadly no. It won’t work and here’s why as far as I understand the current mechanism: The pluginManagerment block in settings.gradle defines which plugins may be resolved in build.gradle. Plugins are...

View Article


Composite build fails because of jvm versions - how to fix?

Hi there. I’m trying to make a composite build work, but I’m getting errors regarding JVM version requirements. The composite build is putting together 4 projects. Each of them works as expected...

View Article

tasks.withType(JavaCompile).findAll doesn't

Thank you ! Seems like that was the issue.

View Article


Composite build fails because of jvm versions - how to fix?

I have added to both projects’ gradle.properties the following line in case it helped, but doesn’t seem to: org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home

View Article

Programmatically apply a plugin

The purpose of the plugins block in settings.gradle is only to define default versions. Only the declaration in a project’s plugins block causes the resolution and addition to the buildscript’s...

View Article

Composite build fails because of jvm versions - how to fix?

… and I also tried adding to each project’s build.gradle this: compileJava.options.fork = true compileJava.options.forkOptions.executable =...

View Article
Browsing all 19850 articles
Browse latest View live