sonar-javascript-plugin version for sonar 3.1 - javascript

I am new to sonar setup. In our project we are using sonar 3.1 version. When I am trying to run the java script report, getting the following error.
“[ERROR] Failed to execute goal
org.codehaus.sonar:sonar-maven-plugin:3.1:sonar (default-cli) on
project AccountBuilder: Execution default-cli of goal
org.codehaus.sonar:sonar-maven-plugin:3.1:sonar failed: You must
intall a Sonar plugin that supports language 'js' in order to analyse
the following project: com.directv:AccountBuilder:JavaScript -> [Help
1]”**
Please let know the exact sonar-javascript-plugin version for sonar 3.1?
I have seen the following URL, but the sonar 3.1 version is not present.
Please guide me.

Javascript Plugin 1.4 is the latest version compatible with SonarQube 3.1. Note that the plugin was much improved then (current version is 2.7) !

What is the release of your JavaScript plugin?
Upgrading SonarQube version would probably solve your problem.

Related

Minimum supported Gradle version is 7.3.3. Current version is 7.0.2 [duplicate]

After update to Android Studio Chimpmunk, I get the error message on Gradle sync:
Minimum supported Gradle version is 7.3.3. Current version is 7.2.'
In my gradle-wrapper.properties, I have got :
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
In my build.gradle, I have :
classpath 'com.android.tools.build:gradle:7.2.0'
I can't change it to:
classpath 'com.android.tools.build:gradle:7.3.3'
the latest version being found by Android Studio being 7.2.0
If I set:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2.0-bin.zip
I also get the same error (stangely).
I to fix this problem?
Thanks.
ANSWER TO MY QUESTION :
For now, I downgraded both to 7.0.4. Update will probably be possible soon.
I just had this problem and invalidating cache fixed the issue.
Image: Invalidate Cache and restart
file/sync project with Gradle Files
I got this problem too after accepting an auto-update prompt from Android Studio. Weirdly, my machine synced OK but other people's didn't.
The gradle version requirement seems to be imposed by the Android gradle plugin (AGP) versions. So also look in your build.gradle files for this kind of thing:
plugins {
id 'com.android.application' version '7.2.0'
id 'com.android.library' version '7.2.0'
}
I found that the AGP version had got bumped to 7.2.0 by the update, and that must have a requirement of Gradle 7.3.3 (confusing!). Anyway, when I edited the AGP back to 7.1.3, then I could downgrade the base gradle distributionUrl to 7.2 and it all worked again.
So this is a compatible set of versions:
build.gradle
plugins {
id 'com.android.application' version '7.1.3'
id 'com.android.library' version '7.1.3'
}
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
I have invalidated cache but it didnt help.
The problem of my setup was a two gradle-wrapper.properties files. Both of them should have same Gradle version but they had different.
yourproject/gradle/wrapper/gradle-wrapper.properties
and
gradle/wrapper/gradle-wrapper.properties
I set the same Gradle version for both of them to the
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
After that issue has gone.
I had the same problem for a project that i havent opened since december 2021, i fixed it by updating the gradle version to 7.4.2 in gradle.wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
and used 7.2.1 for the android gradle plugin version, i've also updated Android Studio to Chipmunk 2021.2.1 Patch 1.
I faced the same issue for Gradle version 7.3.0 (Stable). This is how I solved the issue:
I changed the distribution URL present inside gradle-wrapper.properties file:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
Then removed the following plugin present inside the build.gradle (app module)
apply plugin: 'com.google.gms.google-services'
Finally added this line to the main/AndroidManifest.xml to the activity section:
android:exported="true"
So I've just had the same problem with the incompatible required and current Gradle versions(followed the suggested AGP update). Going back to v7.0.4 has fixed the issue.
However, the answer given by #Khaled has also worked for me.
File > Invalidate Caches > Invalidate and Restart
You have to update to android studio dolphin first (was on chipmunk).
This update support gradle version : 3.2 to 7.3, link here https://developer.android.com/studio/releases/gradle-plugin
Then update gradle-wrapper.properties :
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
Then update your module dependencies as below
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
}
Optional : You will be asked to update gradle plugin to 7.3.1 so you can do it then your will have -> 'com.android.tools.build:gradle:7.3.1'
That's all you need, no invalidate cache and restart or something else.
Install new version Android Studio. It's working for me.

(React Native): Execution failed for task ':app:generatePackageList'

I am generating an apk of a project that I developed using React Native. But when I run the command ./gradlew assembleRelease The following error appears:
> Configure project :react-native-audio
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
> Task :app:generatePackageList FAILED
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\romer\ProjetoAP\Gravador\teste\Gravador_de_audio\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 131
* What went wrong:
Execution failed for task ':app:generatePackageList'.
> argument type mismatch
* 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.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 24s
1 actionable task: 1 executed
PS C:\users\romer\ProjetoAP\Gravador\teste\Gravador_de_audio\android>
How to solve this problem?
I just ran across the same problem and was able to track down why it was happening on my system. Using the --stacktrace flag helped to figure out what was going on, which ended up pointing to the react-native-community/cli package.
After scanning the issues and PRs in the react-native-community/cli repo, I found this PR https://github.com/react-native-community/cli/pull/1396 which adds support for Gradle 7.
I had Gradle 7 on my system and downgrading to Gradle 6, running gradle wrapper, then ./gradlew clean allowed me to move on.
Hope that solves your issue, or at least gives you some insight on how to track it down on your system!
Use Gradle Version 6.9
Here are the highlights of this release:
This is a small backport release.
Java 16 can be used to compile when used with Java toolchains
Dynamic versions can be used within plugin declarations
Native support for Apple Silicon processors
Use Gradle Wrapper to change the Version.
./gradlew wrapper --gradle-version 6.9
Instead of downgrading, I checked the reactNativeModule parameter mentioned at line 131.
It seems like ArrayList<HashMap<String, String>>[] packages = this.reactNativeModules, there is literally a mismatch.
Indeed reactNativeModule doesn't have brackets in his declaration.
So I changed :
ArrayList<HashMap<String, String>>[] packages = this.reactNativeModules
to
ArrayList<HashMap<String, String>> packages = this.reactNativeModules.
Upgrade your react-native version to the latest one with npx react-native upgrade
I had to upgrade from JDK 1.8 to 11 and this error occurred.
Thanks to J Myers answer I found that I had to upgrade the react native version: https://github.com/react-native-community/cli/pull/1396
Steps to solve it for React Native*
Find apply from: file("../../node_modules/#react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) in your app -> build.gradle.
Check if this line of code is being repeated.
Comment out one of them.
This should solve your issue.
Replacing distributionUrl with https\://services.gradle.org/distributions/gradle-6.9-all.zip in gradle/wrapper/gradle-wrapper.properties fixed everything for me. Thank GOD
For me on react-native version 0.70.6
Issue is due to #react-native-community/cli-platform-android version so i just need to run
yarn add #react-native-community/cli-platform-android
As give here
Upgrading #react-native-community/cli as described here solved the issue for me: https://github.com/react-native-community/cli#updating-the-cli
If you use lock files (yarn.lock or package-lock.json) - find all the
#react-native-community/cli prefixed entries, remove them, run yarn
install / npm install once again.

Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort

This is done in VS Code. I have seen TONS OF similar posts, so this is a common occurence. I think it maybe stems from a misunderstanding of gradle builds so any help is greatly appreciated! I created a react-native app following their CLI guide. Running the command react-native android did not work, and I followed a stack overflow solution here https://stackoverflow.com/questions/60844245/how-solve-could-not-initialize-class-org-codehaus-groovy-reflection-reflectionc. The command works, and an emulator is created properly, without having to go into android studio and starting it from there. I do a little bit of coding, and then want to install some extensions. I install flow, and babel E6, boom react-native run-android no longer works. A workaround is to start from android studio. I have followed countless stackoverflow answers on the same question as this title, example gradlew.bat install debug error. I gave up and decided to start a new project, boom run-android doesn't work as it seems is standard. I change my gradle version as per the first link, and the command works now for this second project.
Gradlew --version of 1st project:
Gradle 6.3
------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC
Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 15.0.1 (Oracle Corporation 15.0.1+9-18)
OS: Windows 10 10.0 amd64
gradlew help of 1st project:
BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
gradlew build --warning-mode=all of first project:
The BuildListenr.buildStarted(Gradle) method has been deprecated
Internal API constructor DefaultDomainObjectSet(Class<T>) has been deprecated.
Injecting the input artifact of a transform as a File has been dprecated.
So from my understanding on their troubleshooting site, the issue lies with one of the requested tasks rather than a configuration step.
Furthermore I have tried disabling the flow and babel extensions, as well as remove the added config files that weren't included in the react-native init app. I have also tried changing the package.json file to the same as the working second project. Even if a solution is found for this project, I am still curious as to why everytime I start a react-native project I have to change the gradle version in gradle/gradle-wrapper.properties. Any help or input is greatly appreciated.

What is this cordova build error \ip-regex\index.js:3?

I uninstalled Visual Studio 2017 because so many issues trying to build a blank cordova app. I installed VS2015 expecting its better for it. But Im still getting error about this js script that saying a syntax error.
This is my environment variables, Ive installed 32 bit git manually and the java 32 bit sdk.
Can anybody please tell me what am I doing wrong setting cordova for visual studio 2015?
Here is the final close up error Im getting just building a newly created cordova project.
I just got the same problem. I know it was some time ago, but maybe someone will save time:
The library ip-regex have no fixed version and latest is not compatible.
You should change content of index.js with older version e.g.: https://github.com/sindresorhus/ip-regex/blob/9b6153933a856153fe2ca78081f8851761f03b6c/index.js
Or replace version in package configuration.

Eclipse Window Builder error under Java 10

Eclipse is running under 0, but this Java project has a 10 Java compliance level, so WindowBuilder will not be able to load classes from this project. Use a lower level of Java for the project, or run Eclipse using a newer Java version.
That is the error I'm getting when I installed the window builder. I have made sure both Eclipse and the project are running the same versions yet it is still giving me that error.
Edit:
proof
A MORE SIMPLE SOLUTION: This problem was giving me some difficulty and I hated the hassle of rolling back to a previous version of java to fix it.
There were some developers that workshopped an alternative solution that involved using the install new software function and updating the version of WB via this function. Worked beautifully. The solution is as follows
Wim Jongman CLA Friend 2018-06-06 11:31:54 EDT
...I just got a report back from a user that tells me that upgrading to WB 19.2. helped to solve this issue for him:
Check the installing new software link from [1]
Use the update site from [2]
Select to install everything except stuff that requires WDP
[1] http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-129.htm&cp=0_3_17
[2] http://download.eclipse.org/windowbuilder/WB/integration/4.8/
Solution FOUND
Drop down to Java 9 and make sure to have 3.a Eclipse and you are good!
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase9-3934878.html
There is a link to get Java 9.
Thank you, Everyone, that helped!!
This problem may still occur with WindwowBuilder 1.9.2 and JDK 11 and may be the result of Eclipse itself being launched with an older Java virtual machine.
To solve it, first verify that Project JDK compliance is 11 (Project..Java Compiler..JDK Compliance), and that Java Build Path (Project..Build Path..Libraries) is set to JavaSE-11 (Both settings can also be configured as default for all projects in Window..Preferences..Java..Compiler and Java..InstalledJREs..ExecutionEnvironment).
If that does not solve the problem, then go to
Help..About Eclipse IDE..Installation Details..Configuration
and check the -vm entry to make sure that Eclipse is started with JDK 11.
On Windows the -vm property may be set to something like:
C:\Program Files\Java\jdk-11.0.4\bin\server\jvm.dll
If the configuration's -vm entry points to a lower Java version, then close Eclipse and launch it from the command line by appending ('-vm "path-to-JDK11\bin\server\jvm.dll"). You can also check the eclipse.ini file for the -vm entry (or add the -vm entry to the eclipse.ini file).

Categories