gradle

Gradle - difference between implementation and runtime

安稳与你 提交于 2020-06-15 22:27:56
问题 Having read this Gradle documentation I understand the difference between api and implementation . However I'd like to know if there's a difference between implementation and the deprecated runtime . According to this table there is no difference in behavior, but using runtime in practice seems to "leak" the compile classpath when I was trying it out and so the classes I was trying to hide was actually being exposed to the consuming module. 回答1: implementation dependencies are added to the

Gradle: compileOnly and runtimeOnly

时光总嘲笑我的痴心妄想 提交于 2020-06-15 18:59:50
问题 I'd read the documentation but I'm not able to understand how to create a working example to understand better their differences. And ofc I've created a playground project to check what happens when I use one or another. app.gradle dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0' compileOnly project(":compileonlylibrary") runtimeOnly project("

Gradle: compileOnly and runtimeOnly

戏子无情 提交于 2020-06-15 18:59:04
问题 I'd read the documentation but I'm not able to understand how to create a working example to understand better their differences. And ofc I've created a playground project to check what happens when I use one or another. app.gradle dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0' compileOnly project(":compileonlylibrary") runtimeOnly project("

Issue with latest gradle 5.4.1 - unescaped apostrophe in string

假如想象 提交于 2020-06-15 10:22:06
问题 This is our old gradle classpath 'com.android.tools.build:gradle:3.4.2' ... distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip With the above gradle, we are able to use the following string resource <string name="reminder_doesnt_work_description"><![CDATA[doesn't]]></string> But, if we were upgraded to latest gradle classpath 'com.android.tools.build:gradle:3.5.0' ... distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip We will get the

Can I use compileOnly as a replacement for annotationProcessor in gradle?

假装没事ソ 提交于 2020-06-15 09:26:07
问题 My current understanding of annotation processor is that it refers to code that pre-parses a file looking for certain annotations, generating or changing other code based on that. It happens before the regular compilation phase of your project. In gradle we typically use apt, kpt - and I've seen sometimes the use of annotationProcessor - to indicate that some dependency will be needed at "annotation processing time". If the understand above is right, how does compileOnly differs from apt, kpt

How to resolve duplicate class error in gradle build?

跟風遠走 提交于 2020-06-14 06:34:12
问题 I have tried to use ibm tone analyzer api for my project, but if I include the dependency I get this error: Duplicate class javax.annotation.CheckForNull found in modules annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) Duplicate class javax.annotation.CheckForSigned found in modules annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) I

How to resolve duplicate class error in gradle build?

风格不统一 提交于 2020-06-14 06:33:25
问题 I have tried to use ibm tone analyzer api for my project, but if I include the dependency I get this error: Duplicate class javax.annotation.CheckForNull found in modules annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) Duplicate class javax.annotation.CheckForSigned found in modules annotations-3.0.1.jar (com.google.code.findbugs:annotations:3.0.1) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2) I

groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputFile'

梦想的初衷 提交于 2020-06-14 06:20:28
问题 After upgrading my app from RN 0.42 to RN 0.59.10 this issue came up, unable to build my project. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputFile' for task ':app:processDebugManifest' of type com.android.build.gradle.tasks.ProcessApplicationManifest. Build.gradle apply plugin: 'com.bugsnag.android.gradle' apply plugin: "com.android.application"

Could not start springboot admin, java.lang.NoClassDefFoundError: org/springframework/cloud/netflix/zuul/filters/TraceProxyRequestHelper

♀尐吖头ヾ 提交于 2020-06-14 06:11:38
问题 when i create the sample project try to use springboot admin follow: http://codecentric.github.io/spring-boot-admin/1.4.1/ kickoff gradle bootRun, i got a java.lang.NoClassDefFoundError: org.springframework.cloud.netflix.zuul.filters.TraceProxyRequestHelper when i changed to the spring boot admin to 1.3.2, it works fine, what jar file i lost? i just want to spring boot admin client via http. my application java code: import org.springframework.boot.SpringApplication; import org

Could not start springboot admin, java.lang.NoClassDefFoundError: org/springframework/cloud/netflix/zuul/filters/TraceProxyRequestHelper

こ雲淡風輕ζ 提交于 2020-06-14 06:09:02
问题 when i create the sample project try to use springboot admin follow: http://codecentric.github.io/spring-boot-admin/1.4.1/ kickoff gradle bootRun, i got a java.lang.NoClassDefFoundError: org.springframework.cloud.netflix.zuul.filters.TraceProxyRequestHelper when i changed to the spring boot admin to 1.3.2, it works fine, what jar file i lost? i just want to spring boot admin client via http. my application java code: import org.springframework.boot.SpringApplication; import org