------------------------------------------------------------
Gradle 7.1
------------------------------------------------------------
Build time: 2021-06-14 14:47:26 UTC
Revision: 989ccc9952b140ee6ab88870e8a12f1b2998369e
Kotlin: 1.4.31
Groovy: 3.0.7
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_292 (Amazon.com Inc. 25.292-b10)
OS: Windows 10 10.0 amd64
Do I have a wrong understanding?
Based on the article:
https://docs.gradle.org/7.1/samples/sample_building_java_applications_multi_project.html
When creating a multi module project, I'm NOT prompted about the --test-framework when running gradle init interactive.
When I specify the parameters from CLI like:
gradle init --type java-application --dsl groovy --project-name myapp --package myapp --split-project --test-framework junit
I also get junit-jupiter(Junit5) as test-framework.
buildSrc\src\main\groovy\myapp.java-common-conventions.gradle contains
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
No change, when I use different --test-framework values.
The generated JUnit examples in the sub-projects always using:
import org.junit.jupiter.api.Test;
Any hints? Thanks in advance
Related
Android Studio Chipmunk | 2021.2.1 Patch 2
Build #AI-212.5712.43.2112.8815526, built on July 10, 2022
Runtime version: 11.0.12+7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46)
is my android studio version
`dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
`
even after adding maven jitpack i am unable to import libraries such as
com.synnapps:carouselview:0.1.5
but able to import volley ,retrofit ,firebase libraries sucessfully
while adding synnapps:carouselview i am getting error:
Failed to resolve: com.synnapps:carouselview:0.1.5 Show in Project Structure dialog Affected Modules: app
I am trying to use Gradle on my Windows machine. The command I want to be able to use is:
gradle init --type java-application
But here is the error I get when I run this command on Powershell (or cmd):
> Task :init FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':init'.
> The requested build type 'java-application' is not supported. Supported types:
- 'basic'
- 'cpp-application'
- 'cpp-library'
- 'groovy-appl²cat²on'
- 'groovy-gradle-plugin'
- 'groovy-l²brary'
- 'java-appl²cat²on'
- 'java-gradle-plugin'
- 'java-l²brary'
- 'kotlin-appl²cat²on'
- 'kotlin-gradle-plugin'
- 'kotlin-l²brary'
- 'pom'
- 'scala-appl²cat²on'
- 'scala-l²brary'
- 'swift-application'
- 'swift-library'
As seen in the output, there is probably an encoding issue here. Because
java-appl²cat²on
is displayed as a possible type.
I used versions 6.9 and 7.0.2 and the results are the same. My system language is Turkish but I also use Git, Maven etc. without any issues.
Here is the output of gradle --version in case it is useful:
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_231 (Oracle Corporation 25.231-b11)
OS: Windows 10 10.0 amd64
Update: Issue #17383 has been fixed and is targeted for Gradle 7.2.
You may hit a bug in Gradle. I was able to reproduce the issue by forcing tr-TR locale in environment variable JAVA_TOOL_OPTIONS. I filed a bug in the Gradle issue tracker to have this checked: Build init plugin is locale sensitive.
As a workaround, you could force English locale for project initialization, in Powershell:
PS> $env:JAVA_TOOL_OPTIONS="-Duser.language=en -Duser.country=US"
PS> gradle.bat init --type java-application
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Groovy) [1..2]
I'm trying to build a kotlin library using gradle (wrapped) and gitlab-ci. If i execute commands on my machine everything works fine but gitlab-ci test job doesnt not end and is pending on Task :test.
I'm using basic gitlab-ci inspired by this example.
image: gradle:5.6.2-jdk8
stages:
- build
- test
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
build-latest:
stage: build
script:
- ./gradlew assemble
only:
- master
- tags
test:
stage: test
script:
- ./gradlew check
and that's gitlab-ci ( 12.2.5 ) output
Running with gitlab-runner 12.2.0 (a987417a)
on autoscale-runner eaccdfe9
Using Docker executor with image gradle:5.6.2-jdk8 ...
Pulling docker image gradle:5.6.2-jdk8 ...
Using docker image sha256:5eacc675d8626e3db6a6c4030fc817113f536f565ecd23b7f5aec7e5e5bfcc53 for gradle:5.6.2-jdk8 ...
Running on runner-eaccdfe9-project-769-concurrent-0 via runner-eaccdfe9-autoscale-1570629641-a91eb9db...
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/platform/libraries/kafka2rest/.git/
Checking out 69a3b20e as master...
Removing .gradle/
Removing build/
Skipping Git submodules setup
Checking cache for default-1...
Downloading cache.zip from http://10.164.0.3:9000/runner/runner/eaccdfe9/project/769/default-1
Successfully extracted cache
$ export GRADLE_USER_HOME=`pwd`/.gradle
$ ./gradlew -v
Welcome to Gradle 5.6.2!
Here are the highlights of this release:
- Incremental Groovy compilation
- Groovy compile avoidance
- Test fixtures for Java projects
- Manage plugin versions via settings script
For more details see https://docs.gradle.org/5.6.2/release-notes.html
------------------------------------------------------------
Gradle 5.6.2
------------------------------------------------------------
Build time: 2019-09-05 16:13:54 UTC
Revision: 55a5e53d855db8fc7b0e494412fc624051a8e781
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 1.8.0_222 (AdoptOpenJDK 25.222-b10)
OS: Linux 4.15.0-1044-gcp amd64
$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)
$ ./gradlew check
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileKotlin
> Task :compileJava NO-SOURCE
> Task :processResources
> Task :classes
> Task :compileTestKotlin
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test
What's wrong with this? Is there any standard or template for building kotlin with gradle and gitlab-ci?
Edit
I've found the pending test suite. It contains 3 test, any of them create new instance of controller that has the same start() method. The start() method launch a new thread. If just one test runs it works with successful gitlab-ci termination, if two or more test run it doesn't and it remains in pending state. In tests I use semaphores.
Tests still work locally.
I am facing issue while installing any of the Jenkins plugins suggested.
Actually after downloading,Jenkins.war file(which is latest 2.141) when i tried to execute the jar with
java -jar jenkins.war so it gave me an error of Jenkins require java 8 but you are using 10. Also,it says that java class version 54.0 is running,but it requires java 52.0.
But I was able to resolve this issue by setting --enable-future-java flag.
java -jar jenkins.war --enable-future-java flag
Now,after writing this command,jenkins is up and running but i am unable to install the plugins.
Also,im cmd prompt after the Jenkins is upa d running.There is one error also.
PFB :-
Sep 17, 2018 4:38:49 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
[31mSep 17, 2018 4:39:02 PM hudson.model.UpdateSite updateData
SEVERE: ERROR: SHA-512 based signature in the update center doesn't match with the certificate in 'update site 'default''
[0mSep 17, 2018 4:39:02 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 15,407 ms
You need to add a flag which allows starting Jenkins with unsupported Java versions. You can do some google research on this.
If we change the Jenkins war file version from 2.141 to 2.814 then it is suitable with Java 10 and works fine for plugins installation of Jenkins
i tried to type :
cordova requirements
and it is give result as :
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
so i tried to install gradle manually. And after the gradle was installed, i tried to type:
gradle -v
and then it is give result as :
------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC
Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Windows 7 6.1 amd64
it means the gradle was installed. But when i try to cek the requirements again with type :
cordova requirements
it still give me same result like before as :
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
And after that, i tried again to install gradle in cmd with command :
npm install gradle
and it is give result as :
+gradle#1.0.9
added 20 packages from 14 contributors in 182.961s
[!] 13 vurnerabilities found [4232 packages audited]
severity 2 low | 11 moderate
run 'npm audit' for more detail
and then i tried again to check requirements, and it is gave me same result as:
cordova requirements
it still give me same result like before as
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26
Gradle: not installed
Cannot read property 'length' of undefined
(node:2392) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\src\cli.js:414:27
at _fulfilled (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:2392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
when i check again the version of gradle with type :
gradle -v
it still give the same version as 4.7 with the result :
------------------------------------------------------------
Gradle 4.7
------------------------------------------------------------
Build time: 2018-04-18 09:09:12 UTC
Revision: b9a962bf70638332300e7f810689cb2febbd4a6c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Windows 7 6.1 amd64
my question is, why the gradle still not installed?
please help me, i dont know how to fix it again.
Thank you !
im use:
cordova : 8.0.0
node :8.11.2
java jdk : 1.8.0
gradle : 4.7
windows 7 64-bit
Kindly add path to your system variable. i.e
Open system -> advanced -> Environment Variable
under system variable section click on path and then click on edit button
their add your path to gradle/bin.