gradle-plugin

DriverManager doesn't see dependency in gradle custom plugin's task

允我心安 提交于 2020-01-20 05:20:06
问题 I'm writing some gradle plugin and now I've faced with a problem that DriverManager doesn't see JDBC driver defined in buildscript dependency: I have next build.gradle file: buildscript { repositories { mavenCentral() } dependencies { classpath("com.h2database:h2:1.4.196") } } plugins { id "someplugin" } apply plugin: 'groovy' And when I invoke command defined in task that extends DefaultTask DriverManager.getConnection("jdbc:h2:mem:", "sa", "") I receive exception No suitable driver found

Micronaut - shadow fat-jar plugin not working with corporate repo

房东的猫 提交于 2020-01-16 09:07:09
问题 I am using Micronaut framework for a project and Micronaut CLI generates project with com.github.johnrengelman.shadow gradle plugin which works fine when I run the jar using- $ java -Dmicronaut.environments=E1 -jar build/appBundle/app.jar build.gradle - plugins { id "com.github.johnrengelman.shadow" version "5.0.0" } ... shadowJar { mergeServiceFiles() } The issue is that com.github.johnrengelman.shadow plugin is not working with Jenkins for some reason and I am suspecting that it's not

Gradle: how to make rule-created ZipTask as maven publication artifact

我与影子孤独终老i 提交于 2020-01-15 10:04:12
问题 I want to create a maven publication from inside a RuleSource that will be published via the maven-publish plugin. The artifacts of the publication are the outputs from a series of Zip tasks that are created from rules. When I try to add the artifacts, I get a circular rule exception. Here is my very simple build.gradle : buildscript { repositories { mavenCentral() } dependencies { } } task wrapper(type: Wrapper) { gradleVersion = '3.3' } apply plugin: 'groovy' apply plugin: 'testpub'

Gradle: how to make rule-created ZipTask as maven publication artifact

為{幸葍}努か 提交于 2020-01-15 10:03:16
问题 I want to create a maven publication from inside a RuleSource that will be published via the maven-publish plugin. The artifacts of the publication are the outputs from a series of Zip tasks that are created from rules. When I try to add the artifacts, I get a circular rule exception. Here is my very simple build.gradle : buildscript { repositories { mavenCentral() } dependencies { } } task wrapper(type: Wrapper) { gradleVersion = '3.3' } apply plugin: 'groovy' apply plugin: 'testpub'

How to add a single file to paths in Android studio 1.3+ with experimental gradle plugin (NDK)?

蓝咒 提交于 2020-01-07 03:05:45
问题 There are a lot of examples with adding a whole source folder to paths like a cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString() in new experimental gradle plugin for AS 1.3+ Is there a way to add single source file to it? 回答1: The snippet you're showing is adding an include directory, not sources. It will add headers, not .c/.cpp files. I haven't found a way to add a single source. The plugin will look for all the sources inside jni folders. You can add a jni folder using jni

while implementing Project I am facing this “ Your project contains C++ files but it is not using a supported native build system.” [closed]

情到浓时终转凉″ 提交于 2020-01-04 00:12:00
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . Error:Execution failed for task ':app:compileDebugNdk'. Error: Your project contains C++ files but it is not using a supported native build system. Consider using CMake or ndk-build integration with the stable Android Gradle plugin: https://developer.android.com/studio/projects/add-native-code.html

How to share boilerplate Kotlin configuration across multiple Gradle projects?

回眸只為那壹抹淺笑 提交于 2020-01-03 18:34:16
问题 The typical Kotlin configuration in a Gradle project is very boilerplate, and I'm looking for a way of abstracting it out into an external build script so that it can be reused. I have a working solution (below), but it feels like a bit of a hack as the kotlin-gradle-plugin doesn't work out of the box this way. It's messy to apply any non-standard plugin from an external script as you can't apply the plugin by id, i.e. apply plugin: 'kotlin' will result in Plugin with id 'kotlin' not found.

Gradle application plugin | Incorrect 'lib' folder in generated script

爷,独闯天下 提交于 2020-01-03 16:49:46
问题 I am trying to use Gradle application plugins as follows:- build.gradle :- group 'com.samsoft' version '1.0-SNAPSHOT' defaultTasks("clean", "build") apply plugin: 'java' apply plugin: 'application' apply plugin: 'idea' mainClassName = 'com.samsoft.Main' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' } src/main/java.Main.java :- package com.samsoft; public class Main { public static void main(String[] args) {

gradlew build freezing at mergeDebugResources

冷暖自知 提交于 2020-01-03 08:33:18
问题 I build debug app use gradlew as in google tutorial https://developer.android.com/training/basics/firstapp/running-app.html I was created project use android create project --target 2 -g -v 2.9--name myAppName --path ./MyAppDirectory --activity MyActivity --package com.mypackage and this is my build.gradle file buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } apply plugin: 'android' android { compileSdkVersion 'Google Inc.

gradlew build freezing at mergeDebugResources

痞子三分冷 提交于 2020-01-03 08:32:12
问题 I build debug app use gradlew as in google tutorial https://developer.android.com/training/basics/firstapp/running-app.html I was created project use android create project --target 2 -g -v 2.9--name myAppName --path ./MyAppDirectory --activity MyActivity --package com.mypackage and this is my build.gradle file buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } apply plugin: 'android' android { compileSdkVersion 'Google Inc.