gradle

The project uses Gradle 2.12 which is incompatible with IDEA running on Java 10 or newer

我是研究僧i 提交于 2020-02-22 06:55:50
问题 When i import my Gradle Java project with Intellij Idea i get error The project uses Gradle 2.12 which is incompatible with IDEA running on Java 10 or newer. My Intellij Idea version is IntelliJ IDEA 2019.2 (Community Edition) Build #IC-192.5728.98, built on July 23, 2019 Runtime version: 1.8.0_211-b12 amd64 VM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation Linux 4.15.0-20-generic GC: ParNew, ConcurrentMarkSweep Memory: 1956M Cores: 4 Registry: git.explicit.commit.renames.prohibit

Create an aar with all flutter libraries and dependencies inside

随声附和 提交于 2020-02-22 05:40:51
问题 I need to create an aar with all the libraries of my flutter project inside, I created a flutter module and now I've to create an sdk in android to be embedded in a client app for that it would be nice to have a single aar file. I tried Mobbeel fat AAR Gradle plugin but with no avail. I know I can create a maven repository but that is not the solution I'm looking for right now. my project build.gradle buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } google() jcenter

Create an aar with all flutter libraries and dependencies inside

扶醉桌前 提交于 2020-02-22 05:40:49
问题 I need to create an aar with all the libraries of my flutter project inside, I created a flutter module and now I've to create an sdk in android to be embedded in a client app for that it would be nice to have a single aar file. I tried Mobbeel fat AAR Gradle plugin but with no avail. I know I can create a maven repository but that is not the solution I'm looking for right now. my project build.gradle buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } google() jcenter

Gradle Kotlin DSL: how to configure subprojects using typesafe api

浪子不回头ぞ 提交于 2020-02-22 05:29:44
问题 Gradle 6.1.1 I have been trying to convert my projects' Gradle files using Kotlin DSL in a type-safe manner but so far failed. All my projects are multi-project builds in Java. The idea is to factorize/deduplicate the common configurations of the submodules (whether in the 'subprojects' block of the root module or in a separate 'kts' file I don't care). The official documentation states that it is not possible to have type-safe with 'subprojects' and apply(from = 'shared.gradle.kts') (https:/

mac java 9 gradle ClassNotFoundException: javax.xml.bind.JAXBElement when building

余生颓废 提交于 2020-02-21 13:42:46
问题 I'm trying to build a gradle project on Mac with Java 9, but I'm getting this error: FAILURE: Build failed with an exception. Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBElement Java version is: java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode) How do I add JAXB to the classpath? This projects builds on Windows and other computers OK without adding JAXB. 回答1: You're seeing this because of

defining subprojects in a deeply nested directory tree

北慕城南 提交于 2020-02-21 13:24:28
问题 how do I define sub projects in a nested directory tree where the sub-project folders are not immediate children of the root project root lala A lulu B Now I Want to add A & B as sub projects. If I do //settings.gradle include "lala:A", "lulu:B" then also "lala" and "lulu" will be added as sub projects. However I only want to add A & B and nothing else. 回答1: By default, Gradle assumes that the physical directory layout follows the logical project hierarchy, but you can reconfigure it any way

Android Studio工程目录介绍

给你一囗甜甜゛ 提交于 2020-02-21 11:41:41
来自知乎: Android Studio工程目录结构 .gradle 是gradle运行以后生成的缓存文件夹。 .idea 是android studio/Intellij IDEA工程打开以后生成的工作环境配置文件夹 ,包括一些copyright复制版权,编译,编码语言,运行配置,工作空间等配置。 app 文件夹是你的application module ,其中包含你的源码src以及编译生成的东西 build文件夹(这个里面又有四个文件夹,其中outputs为生成的apk包存放的地方 ,其它,另外generated文件夹也会有某些aidl生成的java文件在这里面), 以及libs库 build 文件夹为编译时的缓存文件夹,每次运行时都会生成,同时在运行了gradle clean 的任务以后它会被删除清理掉。有一个generated文件夹和intermediates文件夹 ,在我的工程中,也没有看到什么重要的东西。 gradle 文件夹中包含的是gradle-wrapper.jar文件,通过配置其中的 gradle-wrapper.properties中的distributionUrl 可以给你的项目指定需要使用 的gradle版本,这个是个远程的地址,我的是 https://services.gradle.org/distributions/gradle-2.10-all

Cross-module code coverage with Jacoco offline instrumentation in gradle mutlimodule project

我是研究僧i 提交于 2020-02-20 05:28:26
问题 I have to use Jacoco offline instrumentation in my project because there is PowerMock that is used as well. The issue description: suppose you have gradle project with two modules: A, B. Module A has tests that cover a code from the module B . On code coverage data collection I figured out that coverage data(should be provided by the module A ) for the module B is completely missed. I've created a test project that demonstrates the issue: https://github.com/SurpSG/jacoco-offline

《Java周边》IDEA 创建Gradle子项目

独自空忆成欢 提交于 2020-02-19 11:01:47
1. 创建Gradle项目 新建项目选择左侧gradle,右侧选择自己jdk版本,勾选java项目,点击Next 写上GroupId组名ArtifactId项目名后点击Next 这里选择使用本地gradle分布,在下面url选择自己本机gradle路径即可,点击Next选择项目路径后Finish就完成创建工作。 点击完成。 创建后的样子 2. 创建Gradle子项目 在项目a上鼠标右键创建子项目。 选择gradle和java模块。 取子项目的名称。 点击完成。 这边自动帮我们生成了src文件。 如果你是: 没有生成src文件。 加入红框代码,会提示你改变。 点击import Changes。 然后再gradle面板里面可以看到,create-dirs,双击任务即可。 加入代码如下: task "create-dirs" << { sourceSets*.java.srcDirs*.each { it.mkdirs() } sourceSets*.resources.srcDirs*.each{ it.midirs() } } 效果展示: 参考: https://www.cnblogs.com/yanfeiLiu/p/9237931.html 来源: https://www.cnblogs.com/jssj/p/12329839.html

JUnit5 tag-specific gradle task

南楼画角 提交于 2020-02-18 08:06:19
问题 I use the following annotation to tag my integration tests: @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Tag("integration-test") public @interface IntegrationTest { } This is the filter I use in build.gradle to exclude these tests from gradle build : junitPlatform { filters { tags { exclude 'integration-test' } } } So far, so good. Now I would like to offer a Gradle task which specifically runs my integration tests – what's the recommended approach?