gradle

Pass env variables to gradle.properties

强颜欢笑 提交于 2021-02-05 11:31:07
问题 I have a property set like this: url=localhost:3206 Is there a way to specifiy this like below instead: url=${hostname}:3206 回答1: I don't think gradle.properties supports interpolation. However, I would suggest an alternative means to accomplishing this: Have the following in your gradle.properties: hostname=localhost port=3206 Somewhere in your build.gradle, do the following: beforeEvaluate { ext.url = "$hostname:$port" } To configure the hostname or port, you have several options. I prefer

bindableService issue with grpc-java

我是研究僧i 提交于 2021-02-05 11:25:26
问题 I am trying to use grpc-java v1.1.2 (build.gradle section below) but when I try to run the fat jar for the sample application, its throwing the exception given below. I do not see any issues when compiling the application. build.gradle parts: apply plugin: 'com.google.protobuf' buildscript { repositories { mavenCentral() mavenLocal() } dependencies { // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier // gradle versions classpath 'com.google.protobuf:protobuf-gradle-plugin

Duplicates class found in modules

∥☆過路亽.° 提交于 2021-02-05 11:13:45
问题 Duplicate class javax.el.ArrayELResolver found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Duplicate class javax.el.BeanELResolver found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Duplicate class javax.el.BeanELResolver$BeanProperties found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar

“Cannot resolve symbol” for all classes from external library in Intellij

孤人 提交于 2021-02-05 08:38:05
问题 I have an Intellij project that uses Gradle. I've added an external dependency in the form of a JAR file in the libs folder, and added it to build.gradle using this: compile fileTree(dir: 'libs', include: '*.jar') Intellij recognizes it as a dependency, since it allows me to browse the file and view its contents, plus it suggests the packages I can import. However, I can't use any of the classes contained. Intellij says Cannot resolve symbol '[classname]' . This occurs in both the library

Flutter build with CI getting error Program type already present: com.google.common.util.concurrent.ListenableFuture

断了今生、忘了曾经 提交于 2021-02-04 07:50:29
问题 I got some Error when build the flutter in CI/CD, i use alvrme/alpine-android:android-29 as builder. i have try to run it in locally with flutter build apk --split-per-abi its run well Here is my app/build.graddle def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk')

The 'kotlin-android-extensions' Gradle plugin is deprecated

做~自己de王妃 提交于 2021-02-04 05:38:32
问题 with the Gradle version 6.2 and Android studio version 4.0.1, I have the deprecation message for the Kotlin-android-extention . any body has any idea how to fix it. 回答1: It's deprecated Base on the google document Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported. for those who's wonder what the synthetic is. I should say a simple way to access to UI view id with kotlin which was possible by adding 'kotlin-android

Gradle 比 Maven 好为什么用的人少

好久不见. 提交于 2021-02-04 01:40:53
都是编译工具,各有各的优势。 貌似常用的几个大项目都将构建移到了 Gradle,例如 Hibernate,Spring。 相对来说也会增加不少 Gradle 的人气吧。 因为不怎么调整编译,很多时候感觉都差不多,但是 Gradle 的学习曲线确实比 Maven 要陡峭一点点。可以说是成也萧何败也萧何,Gradle 就是因为灵活性比 Maven 要好,所以开发插件,提供新的功能就要比 Maven 要容易。 同时 Gradle 也使用 Maven 的中央仓库,很多时候可以说是站在巨人的肩膀上面,在 Gradle 的设计时候就已经考虑过了 Maven 已经存在的一些问题。 就是因为 Gradle 设计灵活性又导致了学习起来难学习。 不太喜欢的是 Gradle 的包结构,当包下载下来后会打上标签,有时候都不知道包下哪里去了,Maven 这里比较直观,就直接能找到。 尤其是在调试的时候,希望能够删掉一个包,使用一个已经编译好的包替代下,直接拷贝过去就好了,使用 Gradle 在这里有点惆怅。 喜欢 Gradle 是,Gradle 比较容易出文档,其实这个问题也不是大问题,Gradle 可以直接编译 Asciidoctor 的文档,然后输出各种格式。 下载速度来说,一般大公司可能都会有 Central Maven 的镜像,感觉上差别不是非常多。 https://www.ossez.com/t

spring源码解析---1.环境搭建

末鹿安然 提交于 2021-02-02 15:51:23
1.安装GitHub。下载地址:desktop.github.com。 2.安装Gradle。下载地址:gradle.org/releases/。 下载好,是个zip包,解压到目录,再配置下环境变量就可以用了。 新建GRADLE_HOME 在系统变量path里,加入对应的Gradle的系统变量 配置好,在系统cmd窗口输入命令“gradle -version”,如果安装成功则会显示gradle对应的系统版本。 1.3下载spring源码。下载地址:github.com/spring-projects/spring-framework 默认会显示master分支,我们切换到4.3.14版本,点击右边绿色的按钮Clone or download,弹出的div中选择Open in Desktop, 然后系统已经安装好的GitHub会弹出如下界面,我们选择好Local path,即源码下载的本地存放路径,选择好再点击clone按钮,进行下载源码操作。 1.3.1 解决GitHub国内下载慢的问题 访问https://www.ipaddress.com/websites/github.global.ssl.fastly.net#ipinfo 将图中显示的ip地址配置到host即可。 更改 C:\Windows\System32\drivers\etc\hosts 文件,在文件中追加 151

Android Studio can't find Kotlin dependency

爷,独闯天下 提交于 2021-01-31 07:21:39
问题 I was trying to upgrade some dependencies for my Android Studio project and now I'm stuck with this error message whenever I try to build the project: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Could not resolve all task dependencies for configuration ':app:debugAnnotationProcessorClasspath'. > Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25. Searched in the following locations: - https://dl.google.com/dl/android/maven2/org/jetbrains