build.gradle

Spring Boot 2 - Change Jar Name

给你一囗甜甜゛ 提交于 2019-12-08 15:05:23
问题 I am using Spring Boot 2 in my Gradle project to do a build to jar in Jenkins, and I would like to change the name of that jar file. By default, Spring Boot 2 used the Gradle property rootProject.name , which can be set in the /settings.gradle file. However, I would like to change the jar file name, without changing the rootProject.name . Here are my bootJar and springBoot sections of the build.gradle file: bootJar { launchScript() } . springBoot { buildInfo { properties { artifact = "jarName

Build script error, unsupported Gradle DSL method found: 'release()'!

≡放荡痞女 提交于 2019-12-08 14:50:13
问题 I am using Android studio 0.50 release and gradle 1.11-all in my gradle wrapper. I have 3 modules and following are the build.gradle files. Module 1 apply plugin: 'android' apply plugin: 'android-test' android { compileSdkVersion 19 buildToolsVersion '19.0.1' packagingOptions { exclude 'META-INF/ASL2.0' exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } defaultConfig { minSdkVersion 10 targetSdkVersion 19 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false

Failed to resolve com.google.firebase:firebase-crash:17.0.2

人盡茶涼 提交于 2019-12-08 14:44:24
I'm trying to implement a couple of features of Firebase as following; implementation 'com.google.firebase:firebase-core:16.0.4' implementation 'com.google.firebase:firebase-messaging:16.0.4' implementation 'com.google.firebase:firebase-database:16.0.4' implementation 'com.google.firebase:firebase-crash:16.0.4' implementation 'com.google.android.gms:play-services-analytics:16.0.4' The problem is that gradle sync is failing with following errors; Failed to resolve: com.google.firebase:firebase-core:17.0.2 Failed to resolve: com.google.firebase:firebase-messaging:17.0.2 Failed to resolve: com

How to detect when dependency library version updates exist in build.gradle in AndroidStudio project

丶灬走出姿态 提交于 2019-12-08 12:59:56
问题 I've an android project with two modules (typical front-end app and backend). I have three build.gradle files, one in each module and one in the root. The way I've structured my dependencies is by extracting all the versions into separate variables in the root level build.gradle as such ext { // SDK and tools MIN_SDK_VERSION = 19 TARGET_SDK_VERSION = 23 COMPILE_SDK_VERSION = 23 BUILD_TOOLS_VERSION = '24' // app dependencies GOOGLE_API_CLIENT_VERSION = '1.19.0' GOOGLE_PLAY_SERVICES_VERSION =

How to resolve issue with my Gradle file in Android Studio?

人盡茶涼 提交于 2019-12-08 12:56:49
问题 After reinstalling my Android Studio I have big issues because all my projects have problem with Gradle file. There are .jpeg-s attached Gradle File Messages Gradle Sync [Some conflicts in installation area][3] 回答1: I would suggest fresh new install of everything and keep in mind where exactly will you install it (my suggestion would be to keep it simple like C:\Android\ for studio and C:\Android\SDK for SDK Also you can click on Edit next to the SDK location and see what if your SDK report

Strip version number from certain dependencies in Gradle custom plugin

末鹿安然 提交于 2019-12-08 11:15:19
问题 We have a custom plugin where we would like to build a special tar file used for deployment. We would like to strip the version number on certain dependencies. The code for the plugin: void addTarTask(Project project) { Tar tar = project.tasks.create("tar", Tar) tar.classifier = "bin" project.afterEvaluate { tar.into("${project.name}-${project.version}"){ into('lib'){ from project.tasks.jar from project.configurations.runtime } //snip more custom requirements } } } I have tried something

Android Exception while processing task java.io.IOException

白昼怎懂夜的黑 提交于 2019-12-08 09:37:26
问题 I added a new dependency and I started getting the following error when I try to run the application: The error message is: Exception while processing task java.io.IOException: Can't write [/Users/zlee/Desktop/RD/FastLemonFree/client/Android-FastLemon/app/build/intermediates/transforms/proguard/release/jars/3/1f/main.jar] (Can't read [/Users/zlee/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.6.1/b9d63507329a7178e026fc334f87587ee5070ac5/gson-2.6.1.jar(;;;;;;**.class)]

How to Copy dependencies to Build directory in Gradle

ⅰ亾dé卋堺 提交于 2019-12-08 09:06:33
问题 How to Copy dependencies to Build directory in Gradle without adding any tasks in build.gradle like mvn dependency:copy-dependencies.. 回答1: If you really don't want a task for this you could use the copy method of the project object. configurations { compile } dependencies { compile 'someGroup:someArtifact:someVersion' } project.copy { from project.configurations.compile into project.buildDir } One noticeable effect of this is that the resolving will be triggered for every invokation i.e.

Set Android versionCode after Gradle task completes

人走茶凉 提交于 2019-12-08 08:51:29
I have a task that updates my app's version code, called changeVersionCode . This task runs before my Android build tasks ( assembleRelease ), but obviously it happens after the android { } closure. This seems to mean that versionCode is set and cannot be changed even when changeVersionCode runs. Here's a simplified build script that demonstrates how I have tried to approach this problem: // .version is a file that starts at "1" the first time I call this def loadVersionCode() { // fetch version code from a file, '.version' return loadVersionCodeFromFile('.version') } def incrementVersionCode(

How to make gradle build in android project faster?

蓝咒 提交于 2019-12-08 07:20:55
问题 Now i have a project. When i build it with ant, it takes only 40 seconds. But when i build it with gradle, it takes me 3 minutes or 4 minutes, which is really to much for me. How can i fasten my gradle build? 回答1: It can help you if you run Gradle in daemon mode - https://twitter.com/timbray/status/512368955516657664 回答2: If you have multiple cores try gradle --daemon --parallel build , otherwise if you lack multiple cores try gradle --daemon --parallel-threads <number of threads you want to