Gradle tasks missing after bumping gradle version - gradle

I was previously using Gradle 2.3 and the Gradle Android plugin 1.3.1.
After upgrading to 4.0.1 and 2.3.0 respectively, my build fails with the following message:
Task with name 'packageReleaseJar' not found in project
Is there a compatibility problem between these versions of Gradle? I believe this is not a custom defined task.

Related

Can't change Gradle wrapper version unless the build succeeds

I have a Gradle project that uses the wrapper. The project does not build because the wrapper currently uses Gradle version 7. I know the project will build if I downgrade to version 6.
The problem:
When I run ./gradlew wrapper --gradle-version 6.8, I get a build error. I checked with ./gradlew --version to confirm it's still on 7. That's ironic. That's exactly why I want to downgrade to version 6!
How can I downgrade in this situation.

Cannot locate a Guava Jar in the gradle distribution?

I have the following error while performing the gradle build command.
What went wrong:
Execution failed for task ':asciidoctor'.
> Cannot locate a Guava JAR in the Gradle distribution
I'm using macOS Big Sur.
I had the same issue on my system.
It appears the problem was the use of the "3.2.0" version of "asciidoctor" plugins. The gradle version I'm currently using is "7.2".
This is the plugins section that was causing the problem:
plugins {
id("org.asciidoctor.jvm.pdf") version "3.2.0"
id("org.asciidoctor.jvm.gems") version "3.2.0"
id("org.asciidoctor.jvm.convert") version "3.2.0"
}
The fix was just to update the versions of these plugins to the latest version, which is "3.3.2".

Is it possible to force Gradle to downgrade version of some dependency with particular extension

I have dependencies on several plugins in project. These dependencies are put in plugins directory during project build. Here is the example:
plugin 'com.company:some-plugin:1.0#msi'
plugin 'com.company:some-plugin:1.0#pkg'
Now it is time to upgrade plugin version but for some reason I want to keep version of plugin for Mac (pkg) unchanged:
plugin 'com.company:some-plugin:2.0#msi'
plugin 'com.company:some-plugin:1.0#pkg'
How can I do it? Regular force does not help. What I see now is that Gradle upgrades version of all dependencies without considering of extension.
P.S. I use Gradle 5.2

Importing Grails project to IntelliJ IDEA using Gradle fails

When importing a Grails 3+ project to IntelliJ IDEA Ultimate, the Gradle build stops at “Starting Gradle Daemon...”.
Screenshot of IntelliJ build window
This happens when a new Grails 3 project is created using the command “grails create-app projectName” and imported to IntelliJ IDEA using Gradle.
My system configuration:
macOS Catalina
IntelliJ IDEA Ultimate 2020.1
Java 8
Grails 3.3.5
Groovy 2.4.15
The Gradle build fails with no other error messages.
“gradle”, “./gradlew”, “./gradlew bootRun” commands work as expected on the terminal.
Check the Gradle JVM which is set for project and make sure it is compatible for the Gradle version used in project:
Try setting different JDKs including the 1.8 JDK there.

Gradle keep on asking update and downgrade?

I keep on getting "Gradle Sync error" so i checked had version 1.8. updated to 1.10, then it said i need 1.9, so i downgraded to 1.9 it said i need 1.8, when i downgrade to 1.8 it says i need 1.9.
15:28:09 Failed to refresh Gradle project 'Calendar'
You are using Gradle version 1.8, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Fix Gradle wrapper and re-import project Gradle settings
15:28:26 Failed to refresh Gradle project 'Calendar'
You are using Gradle version 1.10, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Fix Gradle wrapper and re-import project Gradle settings
15:28:39 Failed to refresh Gradle project 'Calendar'
Gradle version 1.8 is required. Current version is 1.9. If using the gradle wrapper, try editing the distributionUrl in
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Android
Studio\gradle\wrapper\gradle-wrapper.properties to gradle-1.8-all.zip.
Please fix the project's Gradle settings.
Gradle 1.10 is not yet supported in AS, Android Tools Developer team is working on it and probably will be available in next release.
As of now make sure all your build.gradle files in the project using gradle 1.9 as dependency
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
Update :
Gradle 1.10 is now supported in Android studio after release 0.4.3, so going forward you can start using 1.10 plugin by using 0.8.+ in your classpath like this
classpath 'com.android.tools.build:gradle:0.8.+'

Resources