build.gradle

Failed to resolve common open file gradle.build

我是研究僧i 提交于 2019-12-04 22:37:24
I have been struggling with the past 6 hours over this one error, which i am not able to resolve.I imported the project directly from nextgis github. Please identify whats wrong and how to rectify it. here' s the screen-shot of the error here the build.gradle file from the module which contiains the error apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '27.0.3' defaultConfig { minSdkVersion 14 targetSdkVersion 26 versionCode 37 versionName '2.5.7.1' buildConfigField "String", "CLIENT_ID", "\"Im6GFdPPuPM09BnvFb3EacFZyq8TpRBSAAex7JDZ\"" } productFlavors {

gradle compileJava error: package org.junit does not exist

耗尽温柔 提交于 2019-12-04 22:26:26
I'm trying to implement a simple junit test using gradle and running into the following issue when I run gradle test : :compileJava /Users/wogsland/Projects/gradling/src/test/CalculatorTest.java:1: error: package org.junit does not exist import static org.junit.Assert.assertEquals; ^ /Users/wogsland/Projects/gradling/src/test/CalculatorTest.java:1: error: static import only from classes and interfaces import static org.junit.Assert.assertEquals; ^ /Users/wogsland/Projects/gradling/src/test/CalculatorTest.java:2: error: package org.junit does not exist import org.junit.Test; ^ /Users/wogsland

How to integrate Liferay DXP with Apache POI?

人盡茶涼 提交于 2019-12-04 20:27:09
I'm trying to integrate Apache POI in Liferay DXP(OSGi) , but unable to resolve dependencies with POI 3.17 version in gradle project. I've created standalone project with below JAR's : poi-3.17.jar poi-ooxml-3.17.jar poi-ooxml-schemas-3.17.jar xmlbeans-2.6.0.jar commons-collections4-4.1.jar Also, I've added below gradle dependencies added in build.gradle compile group: 'org.apache.poi', name: 'poi', version: '3.17' compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17' compile group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: '3.17' compile group: 'org.apache.xmlbeans',

Gradle embedded jetty plugin is not stopping automatically

拟墨画扇 提交于 2019-12-04 18:44:39
I am able to run embedded jetty with gradle jettyRunWar command. However, it is not automatically stopped on program termination. I tried below two code after searching the solution on stackoverflow and other forums. But none works. 1) build.gradle apply plugin: 'jetty' task runJetty() { jettyStop.stopPort = 8090 dependsOn jettyRunWar finalizedBy jettyStop } 2) build.gradle apply plugin: 'jetty' task runJetty() { doFirst { jettyRunWar.stopPort = 8090 jettyRunWar.stopKey = 'stopKey' jettyRunWar.daemon = true tasks.jettyRunWar.execute() } doLast { jettyStop.stopPort = 8090 jettyStop.stopKey =

can't build android project it shows error

旧城冷巷雨未停 提交于 2019-12-04 18:12:24
project gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-alpha3' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } App Gradle apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25

Shadow Plugin Gradle: What does mergeServiceFiles() do?

烈酒焚心 提交于 2019-12-04 17:51:34
问题 In my build.gradle file I need to add the line: shadowJar { mergeServiceFiles() } Otherwise the jar does not run properly. I wonder what this line does exactly? I use the Gradle plugin in Eclipse Luna. I create the jar on one Java project which depends on another one. 回答1: mergeServiceFiles is declared exactly here and its implementation is as follows: /** * Syntactic sugar for merging service files in JARs * @return */ public ShadowJar mergeServiceFiles() { try { transform

use latest snapshot version from the remote repo

浪子不回头ぞ 提交于 2019-12-04 17:16:44
问题 For now, I should to specify version explicitly: dependencies { compile 'projGroup:projName:0.1-SNAPSHOT' } What's I've tried, but it doesn't work: compile "projGroup:projName:0.+-SNAPSHOT" compile "projGroup:projName:+" How can I tell gradle to use latest snapsot version from the remote maven repo? 回答1: Verified with Gradle 2.2.1: Override default 24h module caching in Gradle: configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' } Then, latest.integration will work

Better to use task dependencies or task.doLast in Gradle?

拈花ヽ惹草 提交于 2019-12-04 17:16:03
问题 After building my final output file with Gradle I want to do 2 things. Update a local version.properties file and copy the final output final to some specific directory for archiving. Let's assume I already have 2 methods implemented that do exactly what I just described, updateVersionProperties() and archiveOutputFile() . I'm know wondering what's the best way to do this... Alternative A: assembleRelease.doLast { updateVersionProperties() archiveOutputFile() } Alternative B: task myBuildTask

Resolved versions for app (26.1.0) and test app (27.1.1) differ

安稳与你 提交于 2019-12-04 17:04:01
问题 This is the full error- Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details. I know that there are a lot of solutions to this type of answers but I am an absolute beginner in android studio and I couldnt understand those solutions like the command

Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File

时光怂恿深爱的人放手 提交于 2019-12-04 16:59:52
问题 I imported a project downloaded from GitHub into my Android Studio project as module. The "Import module..." wizard worked fine, but when the Adroid Studio tried to rebuild the project, it returned me this error: Cannot get property 'compileSdkVersion' on extra properties extension as it does not exist Open File The error is related to this line in the "build.gradle" file of the imported module: compileSdkVersion rootProject.compileSdkVersion I tried to add "ext" section in the project "build