build.gradle

How do I download my Gradle project external dependencies to a specific folder?

痞子三分冷 提交于 2019-12-07 04:45:07
问题 I want to download my dependencies to a specific folder in my build as part of my build process e.g. build/lib . I can't find documentation which shows how to do this, I'm sure there is a straightforward way to do it that I'm missing. My current(shortened) build.gradle is the following. The project compiles and executes test correctly. apply plugin: 'java' apply plugin: 'maven-publish' repositories { mavenCentral() } dependencies { compile( 'aopalliance:aopalliance:1.0', 'log4j:log4j:1.2.17',

Gradle: DefaultAndroidSourceDirectorySet to File using toString() method has been deprecated

风格不统一 提交于 2019-12-07 04:38:28
问题 I want to update the Gradle plug-in of an Android library project. The new version is 0.10.4 . The Gradle wrapper is at 1.10 . The following warning appears when I run ./gradlew install on the project. Converting class com.android.build.gradle.internal.api. \ DefaultAndroidSourceDirectorySet to File using toString() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use java.io.File, java.lang.String, java.net.URL, or java.net.URI instead. I am not sure but the

Import of Eclipse project into Android Studio using build.gradle file fails

不想你离开。 提交于 2019-12-07 04:32:35
问题 I'm trying to import my Eclipse based Android project using the build.gradle file. I get the following message: "failed to find Build Tools revision 18.0.0". However, according to the Android SDK Manager, I have Android SDK Build-tools 18.0.1 installed. I am doing all this on a 64-bit Windows 7 machine, if that's relevant. How do I fix this? UPDATE: I actually only updated to Build-tools 18.0.1 this morning. I then noticed that, when making a new project in Android Studio, it wouldn't allow

ionic3: more than one library with package name 'com.google.android.gms.license' [duplicate]

非 Y 不嫁゛ 提交于 2019-12-07 04:18:51
问题 This question already has answers here : Error: more than one library with package name com.google.android.gms.license (15 answers) Closed last year . I have this error: Execution failed for task ':processDebugResources'. Error: more than one library with package name 'com.google.android.gms.license' when i have run ionic cordova run android this is info ionic: cli packages: (AppData\Roaming\npm\node_modules) @ionic/cli-utils : 1.19.2 ionic (Ionic CLI) : 3.20.0 global packages: cordova

Gradle replace token in a file during build process

落爺英雄遲暮 提交于 2019-12-07 04:01:23
问题 I have a web application and I use gradle to build it. In one of the xml files in WEB-INF folder (src/main/webapp/WEB-INF/my.xml) I have a piece of file that needs replacing. <system-properties> <property name="clientId" value="@clientId@" /> </system-properties> When I try to replace the token with some value using: processResources{ filter(ReplaceTokens, tokens:['clientId': 'test']) } Than when I run gradle build the token in the output file (./build/exploded-app/WEB-INF/my.xml) is not

How do I import dependencies after declaring them in build.gradle?

时间秒杀一切 提交于 2019-12-07 03:49:43
问题 I am just starting to work on android studio and beginning to explore the world of Gradle. So I created a project in Android Studio, opened up build.gradle and added dependencies like the below: dependencies { compile 'com.android.support:support-v4:19.0.1' compile 'com.android.support:appcompat-v7:19.0.1' compile 'com.squareup.retrofit:retrofit:1.3.0' compile 'com.jakewharton.timber:timber:2.1.0' } After this I notice a tip popping up on build.gradle which says: You can configure Gradle

gradle finished with non-zero exit value 3

人走茶凉 提交于 2019-12-07 03:14:50
问题 My project contains 3 libraries: calendar_cmcc , Wheel_library and yellowPage_lib . I can build the project perfectly, but gradle throws an error when I run it.Here is the error: Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/jim/tools/jdk1.8.0_45/bin/java'' finished with non-zero exit value 3 gradle file list: app's build.gradle: apply plugin: 'com.android.application'

change file permission by gradle

被刻印的时光 ゝ 提交于 2019-12-07 03:08:19
问题 I create .jar file and move it to dir, but I don't understand how I can change permission for this file after. task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'Gradle Jar File Example', 'Implementation-Version': version, 'Main-Class':'com.asd.App', 'Class-Path': 'com.asd' } baseName = project.name + '-all' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } def file = file('/home/master/project/asd') fileMode = 755 destinationDir = file with

Strange gradle error android studio

ⅰ亾dé卋堺 提交于 2019-12-07 02:03:27
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network) The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart

Adding firebase to libgdx project built with gradle

て烟熏妆下的殇ゞ 提交于 2019-12-07 02:02:34
Here is my gradle.build. Im trying to add the firebase dependency so I can play with the simple login functions but gradle looks like it cant find the dependency. I copy and pasted what the firebase simple login example said to add to the build.gradle file but im coming up with this error. Included is the build.gradle file and a full stack trace of when I tried to build it from command line. buildscript { repositories { mavenCentral() mavenLocal() maven { url 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/' } } dependencies { classpath 'de.richsource.gradle.plugins:gwt