gradle

Run tests in parallel using Cucumber with Java Selenium with Gradle

痴心易碎 提交于 2021-01-28 06:20:31
问题 I'm using Cucumber with Gradle and would like to run Cucumber features in parallel but can't figure out how. My cucumber executor looks like this: task cucumber() { dependsOn assemble, compileTestJava doLast { javaexec { main = "cucumber.api.cli.Main" classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output args = ['--plugin', 'pretty', '--plugin', 'json:build/reports/cucumber-report.json', '--plugin', 'html:build/reports/cucumber-report.html', '--glue',

How to filter out a certain portion of ./gradlew project:dependencies command?

十年热恋 提交于 2021-01-28 05:25:01
问题 Our build.gradle files have your normal depndencies block, like so.. dependencies { compile("com.myco.service:service-discovery:+") compile("com.myco.common:some-common:1.0.84") compile("com.myco.cms:cms-service-client:1.0.145") compile("com.myco.stats:some123-stats-service-client:1.0.140") ... } I run this to get the dependency tree $ ./gradlew project:dependencies | grep com\.myco | sort | uniq and get +--- com.myco.canam:canam:0.1.4 +--- com.myco.cms:cms-service-client:1.0.145 (*) +--- com

Specify targets in externalNativeBuild of the build.gradle file-> No signature of method

感情迁移 提交于 2021-01-28 05:13:31
问题 Start a new native c++ project in android studio 4.1.1. Go to build.gradle of the module Add a targets line: externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" version "3.10.2" targets "native-lib" // New line } } Somehow I get an error when I click the green play button (Run 'app'): Build file '<project folder>/app/build.gradle' line: 5 A problem occurred evaluating project ':app'. > No signature of method: build_bcdq4hni531na6stswx8a7txx.android() is applicable for argument

Checkout using gradle script

牧云@^-^@ 提交于 2021-01-28 04:40:29
问题 I am new to gradle.I want to checkout remote repository using gradle script. It is possible to run shell command Inside gradle task to clone remote repository with datetime stamp shell commands. 回答1: Yes, you can use a gradle Exec type task to execute any arbitrary command in the OS shell. See documentation and examples here. You didn't say what type of repo you're using, but there is a gradle git plugin to do git operations including checkout. 回答2: Here's an example of how we do it: project

flutter run failed: A problem occurred configuring project ':shared_preferences'

拜拜、爱过 提交于 2021-01-28 03:33:45
问题 I am Using flutter 1.2 and my project runs successfully before I add shared_preferences package to it.I am using shared_preferences: ^0.5.1+2. after I add it, flutter run command creates this error: Error running Gradle: ProcessException: Process "/home//Desktop/projects/fycx/android/gradlew" exited abnormally: Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details Configure project :shared_preferences Project evaluation failed including an error in

NoSuchAuthorityCodeExcpetion in geotools program (gradle build) converting between coordinate systems

大兔子大兔子 提交于 2021-01-28 02:58:08
问题 I have a java geotools program to convert a coordinate between two coordinate systems. It attempts to convert between coordinate system ESPG:4326 and ESPG:5179. I receive the following exception when trying to execute this line in my code: CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326"); Exception in thread "main" org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS". at org.geotools.referencing

Jar is not generated after running build task in android gradle 3.6.1

為{幸葍}努か 提交于 2021-01-28 02:17:31
问题 My build jar task works fine in grade 3.5.3, but it doesn't work in grade 3.6.1. I checked my build files, however, the /build/intermediates/packaged-classes/ dir is weirdly missing. The gradle scripts: task buildJar(dependsOn: ['build'], type: Jar) { doFirst { manifest { attributes 'Jar-VersionName': jarVersionName attributes 'Jar-VersionCode': jarVersionCode } } from zipTree(file('build/intermediates/packaged-classes/release/classes.jar')) appendix = "" baseName = "pp" version =

How to fix tzdb.dat not found error in java?

☆樱花仙子☆ 提交于 2021-01-28 00:40:06
问题 When I try to connect my gradle project with sqlite database, I have an error: Exception in thread "main" java.lang.Error: java.io.FileNotFoundException: null\lib\tzdb.dat (The system cannot find the path specified) at sun.util.calendar.ZoneInfoFile$1.run(ZoneInfoFile.java:261) at java.security.AccessController.doPrivileged(Native Method) at sun.util.calendar.ZoneInfoFile.<clinit>(ZoneInfoFile.java:251) at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:589) at java.util.TimeZone

How to compile only changed file using gradle build in java projects

送分小仙女□ 提交于 2021-01-27 21:50:56
问题 I am using gradle to build a java project. I see that whenever there is a change in one java file entire projects gets rebuilt. Is there a way to compile only affected java files instead of all the files. 回答1: Gradle now supports compile avoidance , and has support for incremental compilation since earlier. You do not have to do anything to enjoy these features. Just update Gradle. See https://blog.gradle.org/incremental-compiler-avoidance 来源: https://stackoverflow.com/questions/43042305/how

liquibase gradle postgresql wrong driver

吃可爱长大的小学妹 提交于 2021-01-27 21:24:36
问题 Environment: Spring boot (STS 3.9.1) Gradle 2.13 Postgresql 9.6.5 Liquibase Gradle plugin (liquibase-gradle-plugin:1.2.4) Scenario: We have a spring boot rest api, we want it to have a CI process that updates the database at a stage of the process, for this we want to use gradle for it buildscript { repositories { mavenCentral() } dependencies { classpath('org.springframework.boot:spring-boot-gradle-plugin:1.5.7.RELEASE') // tag::build[] classpath('se.transmode.gradle:gradle-docker:1.2') //