gradle

Configure Jacoco with gradle and kotlin DSL

拟墨画扇 提交于 2020-05-11 18:56:13
问题 I'm trying to configure Jacoco to exclude some classes from analysis but can't find any working example :( I found some samples with afterEvaluate but no success 回答1: src/main/java/org/example/A.java : package org.example; class A { } src/main/java/org/example/B.java : package org.example; class B { } src/test/java/org/example/ExampleTest.java : package org.example; public class ExampleTest { @org.junit.Test public void test() { new A(); new B(); } } build.gradle.kts : plugins { java jacoco }

Gradle Sync Failed Android Studio 3.6 [duplicate]

会有一股神秘感。 提交于 2020-05-11 03:57:40
问题 This question already has answers here : Cannot enable Gradle's offline mode on Android Studio 3.6 (9 answers) Closed 2 months ago . I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors: 1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'. 2. org

Gradle Sync Failed Android Studio 3.6 [duplicate]

不羁岁月 提交于 2020-05-11 03:57:06
问题 This question already has answers here : Cannot enable Gradle's offline mode on Android Studio 3.6 (9 answers) Closed 2 months ago . I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors: 1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'. 2. org

Cannot find a version of 'com.google.code.findbugs:jsr305' that satisfies the version constraints

て烟熏妆下的殇ゞ 提交于 2020-05-10 07:54:31
问题 When generated signed APK for realse i get this error message: Cannot find a version of 'com.google.code.findbugs:jsr305' that satisfies the version constraints: Dependency path 'XX:app:unspecified' --> 'androidx.test.espresso:espresso-core:3.1.2-alpha01' --> 'com.google.code.findbugs:jsr305:2.0.1' Constraint path 'XX:app:unspecified' --> 'com.google.code.findbugs:jsr305' strictly '1.3.9' because of the following reason: debugRuntimeClasspath uses version 1.3.9 This is my app:gradle android {

Passing parameter and value to Gradle liquibase plugin

坚强是说给别人听的谎言 提交于 2020-05-10 06:31:13
问题 I'm using gradle liquibase plugin (https://github.com/liquibase/liquibase-gradle-plugin) but I don't understand how to pass parameters and values. I want build a rollback based on tag and date but I'm only able to rollback on a tag with this command: gradle rollback -DliquibaseTag=value I don't understand how I should pass data, tag or count. My grade.build is very simple: apply plugin: 'liquibase' buildscript { repositories { mavenLocal() mavenCentral() } dependencies { classpath 'org

Passing parameter and value to Gradle liquibase plugin

随声附和 提交于 2020-05-10 06:26:27
问题 I'm using gradle liquibase plugin (https://github.com/liquibase/liquibase-gradle-plugin) but I don't understand how to pass parameters and values. I want build a rollback based on tag and date but I'm only able to rollback on a tag with this command: gradle rollback -DliquibaseTag=value I don't understand how I should pass data, tag or count. My grade.build is very simple: apply plugin: 'liquibase' buildscript { repositories { mavenLocal() mavenCentral() } dependencies { classpath 'org

Include scripts with Gradle Kotlin DSL

那年仲夏 提交于 2020-05-10 04:32:06
问题 I'm trying to start using Kotlin DSL with gradle in the project with the following restrictions: Project has different modules (moreover: sometimes these modules use different plugins, however if two projects uses the same plugin then version of the plugins are the same). Project has internal corporate repositories only (e.g. we don't use jcenter directly, we use proxy for it). What we have with Groovy: Some common configurations items are excluded to the separate scripts. Please check the

Excluding the same group from multiple dependencies in gradle?

走远了吗. 提交于 2020-05-10 04:26:45
问题 I have the following code in the build.gradle in the app module of my Android project implementation('com.google.firebase:firebase-core:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-database:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-auth:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-crash:16.0.1', { exclude group: 'com.android.support' })

Excluding the same group from multiple dependencies in gradle?

非 Y 不嫁゛ 提交于 2020-05-10 04:26:13
问题 I have the following code in the build.gradle in the app module of my Android project implementation('com.google.firebase:firebase-core:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-database:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-auth:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-crash:16.0.1', { exclude group: 'com.android.support' })

Java project with Gradle and building jar file in Intellij IDEA - how to?

对着背影说爱祢 提交于 2020-05-10 04:09:20
问题 Is there anywhere a tutorial on how to create Java project with Gradle and then build the jar file? I'm running into various problems with that. When I create Java project and then add Gradle with File -> New -> Module -> Gradle -> ... then I get some errors about Java EE websocket's not available (I'm using Ultimate Edition) but nevermind about that, I managed to create that project by selecting File -> New -> Project... -> Gradle -> ... and now I have my Java project with Gradle working