I follow all recommandation to make migration of androidX
but when I change distribution
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
I have this error
The Gradle project does not define a task suitable for the requested build.
Review the android/app/build.gradle file and ensure it defines a debug build type.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'null' not found in root project 'android'.
I don't know what to do
Related
I am in the learning process of Grails, and I have gotten the default example application HelloWorld work.
Running, building on Windows with WSL2 in OpenSUSE Leap 15.4.
Grails version 5.2.5
I then proceeded to try different profiles when creating the grails application, with Angular, React and Vue.
These did not go so well. Either something is missing from my configuration, JDK, Gradle, etc., and/or perhaps the generated projects need to be updated to use newer JDK and Gradle.
Perhaps I should report these problems on the Grails Profile GitHub.
https://github.com/grails-profiles/angular/issues
https://github.com/grails-profiles/react/issues
https://github.com/grails-profiles/vue/issues
Web
grails create-app grails-test-web --profile=web
Building and running the application works with both JDK-11/Gradle-7.2 and JDK-17/Gradle-7.6
Angular
grails create-app grails-test-angular --profile=angular
The project was created with Gradle-5.1.1, and I used JDK-11 to build it.
It will not build.
./gradlew bootRun --parallel
FAILURE: Build failed with an exception.
* Where:
Build file '/home/djviking/workspace/grails-test-angular/server/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':server'.
> Failed to apply plugin [class 'org.springframework.boot.gradle.plugin.SpringBootPlugin']
> Spring Boot plugin requires Gradle 6.8.x, 6.9.x, or 7.x. The current version is Gradle 5.1.1
Then I upgraded to Gradle 6.8.1, but that did not work either
> Configure project :server
Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:2.7.5 because no repositories are defined.
Required by:
project :server
FAILURE: Build failed with an exception.
* Where:
Build file '/home/djviking/workspace/grails-test-angular/server/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':server'.
> Receiver class grails.util.Environment does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getProperty(java.lang.String)' of interface groovy.lang.GroovyObject.
React
grails create-app grails-test-react --profile=react
The project was created with Gradle-6.9, and I used JDK-11 to build it.
It will not build/start
./gradlew server:bootRun
./gradlew client:start
Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:2.7.5 because no repositories are defined.
Required by:
project :server
FAILURE: Build failed with an exception.
* Where:
Build file '/home/svmoe/workspace/grails-test-react/server/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':server'.
> Receiver class grails.util.Environment does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getProperty(java.lang.String)' of interface groovy.lang.GroovyObject.
Vue
grails create-app grails-test-vue --profile=vue
The project was created with Gradle-6.9, and I used JDK-11 to build it.
It will not build the project.
./gradlew server:bootRun
./gradlew client:serve
> Configure project :server
Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:2.7.5 because no repositories are defined.
Required by:
project :server
FAILURE: Build failed with an exception.
* Where:
Build file '/home/svmoe/workspace/grails-test-vue/server/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':server'.
> Receiver class grails.util.Environment does not define or inherit an implementation of the resolved method 'abstract java.lang.Object getProperty(java.lang.String)' of interface groovy.lang.GroovyObject.
Works with JDK 17, when I changed Gradle Wrapper to Gradle 7.6
./gradlew server:bootRun
I can access the URL, and I get a JSON structure.
Grails application running at http://localhost:8080 in environment: development
./gradlew client:serve
I can not access the URL from this. Neither on localhost.
App running at:
- Local: http://HOSTNAME:3000/
- Network: http://HOSTNAME:3000/
I have a project structured like
NetworkASCtoSocket
./client
./server
./shared
What i want is being able to compile a fat jars consisting of client+shared+dependencies of both and respective for server.
I have this build.gradle for a root project and empty build scripts for all subprojects, but i am unable to locate task :shadowJar for :client subproject. Executing gradle :client:shadowJar results in
FAILURE: Build failed with an exception.
*What went wrong:
Task 'shadowJar' not found in root project 'client'.
How do i make the task :client:shadowJar work as i expect it to? Or how do i do this multi-project build? I have also thought of doing a separate tasks for a root project as you can see in build.gradle i've provided, but i did not understand, what i should do with the task to behave in requested manner. Appreciate any advice and solution for a problem that i've occured!
I'm trying to integrate Java and npm Builds Using Gradle Kotlin DSL.
I was going through the example dzone article and github example code.
I'm in npm-app project folder and running the command gradle npm_run_build.
$ gradle npm_run_build
Task :npm-app:nodeSetup FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':npm-app:nodeSetup'.
Could not resolve all files for configuration ':npm-app:detachedConfiguration1'.
Could not find org.nodejs:node:10.14.1.
Searched in the following locations:
- https://nodejs.org/dist/v10.14.1/ivy.xml
Required by:
project :npm-app
BUILD FAILED in 810ms
1 actionable task: 1 executed
How can I fix this error?
try switching your node plugin:
plugins {
id "com.github.node-gradle.node" version "1.5.3"
}
I am newbee to Groovy, Gradle, IntelliJ IDEA, Gradle Plugin Development.
Whenever I click on the publishToMavenLocal, I am getting the following error,
Task :compileGroovy FAILED
FAILURE: Build failed with an exception.
What went wrong: Failed to capture snapshot of input files for task ':compileGroovy' property 'classpath' during up-to-date check. >
Failed to create MD5 hash for file content. Deprecated Gradle features
were used in this build, making it incompatible with Gradle 5.0. BUILD
FAILED in 11s 2 actionable tasks: 2 executed Data error (cyclic
redundancy check)
Can anyone help me resolve this ? This is a pure Gradle plugin developed using Groovy.
I downloaded the gradle plugin test project from their github here:
https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin
I also updated gradle to latest (4.7).
When I gradle build the consumer project, I get the following build error:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'consumer'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.gradle:customPlugin:1.0-SNAPSHOT.
Searched in the following locations:
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven-
metadata.xml
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.pom
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.jar
Required by:
project :
What's the issue here? I guess I don't understand gradle plugins enough. Does the plugin need to be built somehow? I have no 1.0-SNAPSHOT pat or anything of the sort, which seems to be where its looking.
Does the plugin need to be built somehow ?
Yes, at first, otherwise the consumer project won't find it.
Inside the plugin project, just run gradle uploadArchive
And then retry a gradle build inside the consumer project