gradle-plugin

Gradle Custom Plugin: gradleApi() vs Explicit Dependency

人走茶凉 提交于 2020-01-02 02:52:08
问题 I'm developing a custom gradle plugin and the dependencies for my plugin project look like this: dependencies { compile gradleApi() compile localGroovy() compile('com.xxx.oozie:oozie-dsl-parser:1.0.127') { exclude module: 'groovy-all' } testCompile('org.spockframework:spock-core:1.0-groovy-2.3') { exclude module: 'groovy-all' } } However, in the interest of reproducible builds, I'm wondering if using localGroovy() and gradleApi() is advisable. After much googling, although I could replace

Create custom Build init type - for Gradle Build Init Plugin?

我只是一个虾纸丫 提交于 2020-01-02 01:05:11
问题 I'm fairly new to gradle and I would like to create a custom type for with the Gradle Init Plugin. Moreover, I'd like to be able to do something like: gradle init --type jsp-library This would generate a project directory with the same structure as a Java web application (webapp, stylesheets, etc...). Yes, I have read this, and I know that only a limited amount of types are available. I just want to know if someone has or knows of some sort of work around for the time being. 回答1: There are

Google Glass SDK: Gradle sync failed: Cause: failed to find target Google Inc.:Glass Development Kit Preview:19

若如初见. 提交于 2019-12-31 04:37:12
问题 I am getting this error after importing and trying to build the gdk-apidemo-sample-master in Android Studio: Gradle sync failed: Cause: failed to find target Google Inc.:Glass Development Kit Preview:19 Please advice. Thanks 回答1: I had the same problem and seems to be gradle doesn't support GDK in the newer versions. Open Android Studio and click open, under File menu, and select the directory of your project. In Top-Level build.gradle file, change the 8th line with classpath 'com.android

Android/Gradle: conditionally apply plugin based on build type

不羁的心 提交于 2019-12-30 05:56:40
问题 I would like to make something like (pseudo code): if (BuildType == "release"){ apply plugin: 'testfairy' } else if (BuildType == "debug"){ apply plugin: 'io.fabric' } The idea is that based on the build type, apply (or not) a plugin. How to do it ? 回答1: With Gradle 4.6, the following works: if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")) { apply plugin: 'testfairy' } else if (getGradle().getStartParameter().getTaskRequests().toString().contains("Debug"))

Reset default gradle and plugin for android studio to be up to date when creating new projects?

两盒软妹~` 提交于 2019-12-29 07:06:07
问题 Is there a way to reset the default gradle and plugin, without resetting all my settings, so I don't keep having these errors when creating new projects? Error: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to So in the top level build.gradle I update to: dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha6' } And then change the gradle to 2.10 as per requirements here. 2.0.0-alpha5 (2016/1/14) // hence alpha6

Gradle plugin specifying default extension values

ぃ、小莉子 提交于 2019-12-25 08:22:51
问题 I plan to write custom plugin wrapping several code quality gradle plugins. The logic is simple: using this custom quality I want to enforce "default" standards for all our projects. On the other hand, I want all the wrapped plugins still to be customizable (for example, I'd like to set PMD plugin with "basic" ruleset by default, but definitely I do not want to limit anyone to add addinitional rulesets). What is the recommended strategy to cascade the extensions? Should I do project.create(

Unable to find method 'com.android.tools.r8.Version.getVersionString()Ljava/lang/String;'

纵然是瞬间 提交于 2019-12-24 12:59:31
问题 I have updated my android studio to 3.4. I am getting error while making release build. Unable to find method 'com.android.tools.r8.Version.getVersionString()Ljava/lang/String;'. 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

IllegalStateException:buildToolsVersion is not specified

北城以北 提交于 2019-12-24 12:01:30
问题 My project is comprised of two modules, one is the application module and the other is a library module. My build processes works fine until I added two gradle plugins : This is the root build.gradle : buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4' // NOTE: Do not place your application dependencies here; they

'87% EXECUTING' Message When Running AppEngine App

二次信任 提交于 2019-12-24 11:06:05
问题 Issue When testing an AppEngine application with a development server for a Standard Environment app by running the command gradle appengineRun the message that logs in the console consistently is 87% EXECUTING . A similar message 88% EXECUTING consistently shows when running a Flexible Environment AppEngine Application with the command gradle jettyRun . Does this mean there is an issue with running the application as there are no errors in the log? Log Adams-MBP-2:coinverse-price adamhurwitz

Any android Studio version > 3.2.1 show red resource but still compile

陌路散爱 提交于 2019-12-24 07:35:32
问题 Me and my team are blocked to Android Studio 3.2.1. Any android studio after this one show error for ressource. Ressource are still clickeable/inspectable from editor but are in red. Preview of fragment is KO too. Work with : Android Studio 3.2.1 Gradle plugin version 3.2.1 Gradle version 4.6.1 But can't make it works on : Android Studio 3.5 Gradle plugin version 3.5 Gradle version 5.4.1 I have looked this topic : Android Studio inline compiler showing red errors, but compilation with gradle