Gradle build failed with exception

FAILURE: Build failed with an exception.

* Where:
Settings file 'C:\Jenny\Liferay-Code\Liferay7.4-XXX\Liferay_Upgrade_7_4_XXX\settings.gradle' line: 23

* What went wrong:
A problem occurred evaluating settings 'Liferay_Upgrade_7_4_XXX'.
> Failed to apply plugin 'com.liferay.workspace'.
> Could not create an instance of type com.liferay.gradle.plugins.workspace.WorkspaceExtension.
> com/liferay/portal/tools/bundle/support/commands/DownloadCommand

Assuming you are not the author / maintainer of Liferay, you should probably contact them as the error is coming from their code.

I tried to delete .gradle and I am using jdk 11.0.23. I have refreshed the workspace as well. Is there anything else I can do. I tried changing workspace version of settings.gradle properties as well from

buildscript { dependencies { classpath group: “biz.aQute.bnd”, name: “biz.aQute.bnd”, version: “5.2.0”

classpath(group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "4.0.30") 

{ exclude group: “biz.aQute.bnd”, module: “biz.aQute.bnd” } classpath group: “net.saliman”, name: “gradle-properties-plugin”, version: “1.4.6” } repositories { maven { url “Index of /groups/public” } maven { url “Index of /groups/public” } } } apply plugin: “net.saliman.properties” apply plugin: “com.liferay.workspace”

to

buildscript {
dependencies {
classpath group: “biz.aQute.bnd”, name: “biz.aQute.bnd”, version: “5.2.0”
classpath(group: “com.liferay”, name: “com.liferay.gradle.plugins.workspace”, version: “3.4 2”) {
exclude group: “biz.aQute.bnd”, module: “biz.aQute.bnd”
}
classpath group: “net.saliman”, name: “gradle-properties-plugin”, version: “1.4.6”
}

repositories {
maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}

maven {
url "https://repository.liferay.com/nexus/content/groups/public"
}
}
}

apply plugin: “net.saliman.properties”

apply plugin: “com.liferay.workspace”

Is there anything else I can do or this is a Liferay code issue?

Did you see my previous reply?
Because your last line suggests you did not.

Yes I saw it. Actually I am using community edition so I am not sure how can I receive help from Liferay vendor.

I’m sure they have some support form or address on their website.

A post was split to a new topic: NoSuchElementException in for :app:compileDebugJavaWithJavac

I am from Liferay and will be happy to help you out here…

I can tell by the “3.4.2” version of the workspace that you are using extremely old versions of the Liferay plugin, amongst other probable issues.

I’m guessing that the whole workspace would need to be refreshed to update all of these old versions.

We don’t offer support for the gradle build plugins, but you can join our community slack channel Slack and myself and/or others will be happy to work with you to update the environment and get the build working again.

1 Like