gradle

Supporting a Dagger 2 dependency in a Dagger 1 project

我的未来我决定 提交于 2020-02-25 02:10:11
问题 This is a follow-up to my question about Play Services Cast Framework, where the solution seems to be updating from v17.0.0 to v18.0.0. The new version unfortunately has a dependency on Dagger 2, whilst the (large & complex) project is Dagger 1. We are currently using: api "com.google.android.gms:play-services-cast:17.0.0" api "com.google.android.gms:play-services-cast-framework:17.0.0" Updating these to 18.0.0 results in: > 1 exception was raised by workers: java.lang.RuntimeException:

How to make Kotlin `internal` objects accessible to tests?

纵然是瞬间 提交于 2020-02-25 02:08:13
问题 My project uses several Gradle source sets for its production code base instead of just main : domain dal rest test dbUnitTest This has proven very useful for limiting dependencies and enforcing separation of concern. It comes with one downside however: we cannot access classes or methods with visibility internal from within test classes. The reason for this is that the Kotlin compiler places every source set in its own "module": $ find . -name '*.kotlin_module' ./classes/kotlin/domain/META

Calling a powershell script with Gradle

烈酒焚心 提交于 2020-02-25 01:22:53
问题 I am new to Gradle, so bear with me.. I am simply trying to call a .ps1 file to execute with gradle. How would I go about setting up a build.gradle file to execute the .ps1 file within the same directory? Thanks in advance! 回答1: You can use gradle Exec Example: task execPs(type:Exec) { commandLine 'cmd', '/c', 'Powershell -File sample.ps1' } // add this task to your build.gradle file and execute gradle execPs // You can use a different name for this task // You can add a dependency to include

Calling a powershell script with Gradle

会有一股神秘感。 提交于 2020-02-25 01:22:33
问题 I am new to Gradle, so bear with me.. I am simply trying to call a .ps1 file to execute with gradle. How would I go about setting up a build.gradle file to execute the .ps1 file within the same directory? Thanks in advance! 回答1: You can use gradle Exec Example: task execPs(type:Exec) { commandLine 'cmd', '/c', 'Powershell -File sample.ps1' } // add this task to your build.gradle file and execute gradle execPs // You can use a different name for this task // You can add a dependency to include

How to Install android SDK in ubuntu server

旧城冷巷雨未停 提交于 2020-02-24 13:47:50
问题 I have a react native project in ubuntu server, and I want to build an android app for production. to do that I first have to generate Gradle Wrapper files so I run this command in android directory gradle wrapper --gradle-version <my-gradle-version> After I run this command I got this error FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an

How to Install android SDK in ubuntu server

做~自己de王妃 提交于 2020-02-24 13:46:11
问题 I have a react native project in ubuntu server, and I want to build an android app for production. to do that I first have to generate Gradle Wrapper files so I run this command in android directory gradle wrapper --gradle-version <my-gradle-version> After I run this command I got this error FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an

How to generate an executable .sh file with Gradle?

↘锁芯ラ 提交于 2020-02-24 11:51:49
问题 I have a Java project in Eclipse. It works fine and I can run it from cmd using java -jar sample-app.jar I now have to use Gradle to produce an executable sh file for use in Linux. I've found some resources on creating start scripts but the most I've managed to do is use the standard 'startScripts' task to create a sample.app.bat file. I've scoured question after question and page after page on google to try and find an answer and I'm not having much luck. I've also read through the Gradle

How to generate an executable .sh file with Gradle?

我的未来我决定 提交于 2020-02-24 11:51:15
问题 I have a Java project in Eclipse. It works fine and I can run it from cmd using java -jar sample-app.jar I now have to use Gradle to produce an executable sh file for use in Linux. I've found some resources on creating start scripts but the most I've managed to do is use the standard 'startScripts' task to create a sample.app.bat file. I've scoured question after question and page after page on google to try and find an answer and I'm not having much luck. I've also read through the Gradle

Executing tasks: [clean, :app:assembleDebug] ERROR - Android Studio 3

◇◆丶佛笑我妖孽 提交于 2020-02-24 11:51:09
问题 i am new of android studio. and i am making my first apps, in the previous version 2.3 i dont have problem or stuck when making apps. but when i upgrade to the new version 3.0 i got problem, and when i trying to rebuild apk. it stuck at Executing tasks: [clean, :app:assembleDebug] . same problem when i build apk, rebuild and clean up. anyone can help fix this ? I still cant fix this. 10 actionable tasks: 9 executed, 1 up-to-date Executing tasks: [clean, :app:assembleDebug] Parallel execution

com.android.builder.dexing.DexArchiveBuilderException: Error while dexing

谁说我不能喝 提交于 2020-02-24 09:07:16
问题 I am getting this issue when I am trying to run my project - com.android.builder.dexing.DexArchiveBuilderException: Failed to process .gradle\caches\transforms-1\files-1.1\firebase-analytics-impl-11.8.0.aar\0e3311be69809df8820438f9666651f5\jars\classes.jar com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. com.android.tools.r8.CompilationFailedException: Compilation failed to complete com.android.tools.r8.utils.AbortException: Error: Type com.google.android.gms.common