Can not create workspace for Liferay 7.2-rc2 - liferay

I am trying to create a workspace for 7.2-rc2 but fail to do so.
I created a normal workspace for 7.1 in Liferay Developer Studio (version 3.5.0) since there is no support for 7.2 yet. To test if I can run code correctly I created a new mvc-portlet in Developer Studio.
I then set liferay.workspace.target.platform.version=7.2.0 in gradle.properties. Gradle is not able to build my module:
15:16:04: Executing task 'deploy'...
Task :wrapper
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':modules:test:buildCSS'.
Could not resolve all dependencies for configuration ':modules:test:detachedConfiguration1'.
Could not find com.liferay.portal:release.portal.bom:7.2.0.
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
Required by:
project :modules:test
Could not find com.liferay.portal:release.portal.bom.compile.only:7.2.0.
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom.compile.only/7.2.0/release.portal.bom.compile.only-7.2.0.pom
https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom.compile.only/7.2.0/release.portal.bom.compile.only-7.2.0.pom
https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom.compile.only/7.2.0/release.portal.bom.compile.only-7.2.0.pom
https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom.compile.only/7.2.0/release.portal.bom.compile.only-7.2.0.pom
Required by:
project :modules:test
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
Could not find com.liferay.portal:release.portal.bom:7.2.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
- https://repo.maven.apache.org/maven2/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
- https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
- https://repository-cdn.liferay.com/nexus/content/groups/public/com/liferay/portal/release.portal.bom/7.2.0/release.portal.bom-7.2.0.pom
Required by:
project :modules:test
15:16:07: Task execution finished 'deploy'.
I do not think the deprecation warning is at fault.
Which settings do I actually have to set to get all the necessary dependencies for 7.2?

It seems that 7.2.0-rc2 or rc3 have not been uploaded into the apache maven central repository yet. I'm also looking for a maven repository that has these artifacts.

By updating existing eclipse, you can build 7.2 plugin. Use below URL from liferay to update eclipse.
Install Liferay IDE

Related

How to fix failing the sync project with Gradle files?

`FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Invalid revision: 3.22.1-g37088a8-dirty
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
CONFIGURE FAILED in 54s
Invalid revision: 3.22.1-g37088a8-dirty
`
I am using 3.1.2 version of android studio software. gradle version is 4.6. I am getting above error when I going to build the project. I tried change the gradle version to 4.4 too in gradle-wrapper.properties file. But anything didn't work. Can anyone have any solution as well as a reason why this happen?
As well as i have not set gradle in environment >> system variable. Because I thougtht It is installing to project from android studio. (Please tell something if there any wrong)

Sync ends with BUILD SUCCESSFUL but Make Project FAILS

All SO post on this subject (except for an unanswered one) describe the exact opposite situation: Build successful but Sync fails.
My situation is that I installed Android Studio for the first time (2021.3.1.17) and successfully imported an old (but working) Eclipse/ADT project of mine: Sync completes successfully, albeit with several warnings:
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1s
It also warns about the Java version:
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Your current JDK is located in C:\Program Files\Java\jdk1.8.0_341\jre
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
Gradle settings
But when I try to Build > Make Project, it surprisingly ends with an ERROR:
Build file 'C:\Users\WebViewer\StudioProjects\MyApp\billing\build.gradle' line: 1
A problem occurred evaluating project ':billing'.
> Failed to apply plugin 'com.android.internal.library'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Your current JDK is located in C:\Program Files\Java\jdk1.8.0_341\jre
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
I understand the warnings (definitely good ones, prompting to update to current versions, and I eliminated the Java version one via File > Settings > Build Tools > Gradle) but... if Sync ends successfully, why would Make Project fail completely?
As a newcomer to Android Studio (IntelliJ + Gradle), I am confused by this discrepancy. Could someone please shed light on the essential difference between Sync, Make Project and Rebuild Project?

FAILURE: Build failed with an exception. creating node js apps

I'm using cordova to create apps and when I used the command
cordova build android I got this error through the CLI:
c:\Apps\projeto_1>cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\Max\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Program Files (x86)\Android\android-sdk
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Starting Daemon
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 7s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
Where:
Script 'C:\Apps\projeto_1\platforms\android\CordovaLib\cordova.gradle' line: 75
What went wrong:
A problem occurred evaluating script.
No usable Android build tools found. Highest 30.x installed version is 29.0.3; minimum version required is 30.0.3.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
Command failed with exit code 1: c:\Apps\projeto_1\platforms\android\gradlew cdvBuildDebug -b c:\Apps\projeto_1\platforms\android\build.gradle
Example of build failure: Build failed with an exception.
Where:
Script 'C:\Apps\projeto_1\platforms\android\CordovaLib\cordova.gradle' line: 75
What went wrong:
A problem occurred evaluating script.
No usable Android build tools found. Highest 30.x installed version is 29.0.3; minimum version required is 30.0.3.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
Command failed with exit code 1: c:\Apps\projeto_1\platforms\android\gradlew cdvBuildDebug -b c:\Apps\projeto_1\platforms\android\build.gradle

Which Gradle version shall be used for classpath after upgrading of android studio and plugins to 4.2.2?

After upgrading android studio from 4.1.3 to 4.2.2 and plugins, the line in build.gradle causes the error:
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2' //<<==which gradle version shall be used here?
}
The error is:
> Could not resolve all artifacts for configuration ':aliyun-oss-react-native:classpath'.
> Could not find com.android.tools.build:gradle:4.2.2.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom
Required by:
project :aliyun-oss-react-native
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
What is the correct version of gradle used for classpath?
Go to your Project Structure settings and update gradle version to 6.7.1+version and let it download and then build project again.
For more information about Gradle and plugin versions check this out https://developer.android.com/studio/releases/gradle-plugin

Github actions not picking up changes to build files in non-master branches

When building my android project via a github action, it always fails when the server hosting the action updates it's NDK plugin versions. This requires me to update my versions as well. However, it never seems to be simple.
For example, in a recent update I just made I noticed the NDK version was behind the server. So I downloaded the new version it's using to my local machine and updated the build files (including the local NDK path). After ensuring it builds fine on my local machine, I push to my branch. However, the server still thinks it's trying to build on the old version and fails the build (even though I told the gradle script to use the new version.).
I can successfully make this update on master, is there some reason actions/checkout#v2 doesn't recognize build file updates to non-master branches?
Welcome to Gradle 6.1.1!
Here are the highlights of this release:
- Reusable dependency cache
- Configurable compilation order between Groovy/Kotlin/Java/Scala
- New sample projects in Gradle's documentation
For more details see https://docs.gradle.org/6.1.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :app
WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> No version of NDK matched the requested version 21.3.6528147. Versions available locally: 21.4.7075529, 21.4.7075529, 21.4.7075529, 22.1.7171670
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 24s
Error: Process completed with exit code 1.

Resources