gradle-plugin

A gradle task take long time to execute and doesn't produce any response. I want to execute that task and move on to next task

时光毁灭记忆、已成空白 提交于 2020-07-10 08:43:44
问题 Inside build.gradle file: task updateJson(){ //updates a json file } task Conn(type: NodeTask, dependsOn: updateJson){ script = file("connect.js") } yarn_test.dependsOn Conn Console Output: :updateJson :Conn Before config :: Connect.js has been executed. Your app is now listening to port 6062. <===========--> 85% EXECUTING > :Conn After that, the yarn_test doesn't start. The task Conn is used to establish a connection and it doesn't return any execution response/result. It only enables

Howto handle clash of tasks for two gradle plugins?

放肆的年华 提交于 2020-06-29 05:40:12
问题 I use gradle with the two plugins com.jfrog.artifactory and io.swagger.core.v3.swagger-gradle-plugin . Now I want to configure as described here https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin the generation of code. But it seems that the resolve task has already been defined from artifactory. How do I adress the method of swagger-plugin directly? This is in my build.gradle: resolve { outputFileName = 'bananas' outputFileName = 'PetStoreAPI' outputFormat

Pass liquibase parameters to gradle liquibase 'update' task

我与影子孤独终老i 提交于 2020-06-27 10:33:50
问题 I want to pass username, password and url liquibase parameters as a command line parameters to gradle's liquibase update task. I have followed liquibase-gradle-plugin to configure the plugin. What I actually want to achieve is, pass these database parameters at runtime instead of hardcoding them in liquibase.properties file. I can do this by exporting these three values as environment variables and access them in build.gradle. But I want to achieve this using commandline parameters. I tried

How to invoke Annotation Processor from Gradle plugin

笑着哭i 提交于 2020-06-13 08:32:09
问题 I am currently working on a Gradle custon plugin that should analyse my root project for specific configs in every subproject and then generate some kotlin source code in the build dir. I can't figure out a way to invoke my annotation processor from my gradle plugin which has a custom task for this matter. Any ideas how to achieve this? Any resource/tutorial/documentation is also highly welcomed. Thanks in advance and be safe. 回答1: After a long time of googling and mostly trying and failing,

Run non main class of spring boot application through command line

橙三吉。 提交于 2020-06-12 05:21:58
问题 I have spring boot application packaged as executable jar. Application has one utility class with main method which I want to invoke through command line but it seems that command is unable to find the class in classpath. Command: java -cp client-stp-grid-publisher-SNAPSHOT.jar com.client.stp.util.JMXClientUtils I tried to set jar classpath in MANIFEST.MF using gradle jar task but no help: jar { baseName = 'client-stp-grid-publisher' manifest { attributes( 'Class-Path': "BOOT-INF/classes/*" )

Gradle custom plugin jar with dependencies

末鹿安然 提交于 2020-05-29 10:59:07
问题 I'm trying to build a jar for a custom gradle plugin to be used by other gradle projects. I'm using java to write the plugin. I'm having a problem including dependencies in my jar. If I build the jar using the below build.gradle plugins { id 'groovy' } repositories{ mavenCentral() } dependencies { compile gradleApi() compile localGroovy() compile 'com.google.guava:guava:27.0-jre' testCompile 'junit:junit:4.12' //compile 'org.apache.commons:commons-lang3:3.8.1' } group = 'com.mine' version =

How to embed Java code into Gradle build using JavaExec task

时光总嘲笑我的痴心妄想 提交于 2020-05-29 07:29:49
问题 I have a Gradle-driven project to which I want to add a simple Java task. This task is very specific to the project and if it can be helped I don't want to develop it as a separate plugin. So the question is can I define such custom task within the same build.gradle I'm using for my project? Or is it inevitable that I need to package it as a separate project (plugin) and install to the local repo? Also it's probably important to note that the original project is not Java related (no other

How to make an equivalent of 'compileOnly' for AAR artifacts?

拥有回忆 提交于 2020-05-29 07:22:34
问题 In real world, if you're writing ui tests for android project, after press 'Run' from Android Studio, it will assemble two apps: 'your.cool.app' and 'your.cool.app.test'. Test app will have in android manifest something like: <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" android:targetPackage="your.cool.app"/> Which actually will be mean, that if you install them both, your test app will be merged with a real one - all dependencies (third-party libs etc..) will be in