gradle

Gradle SourceSet dependencies in IntelliJ

不打扰是莪最后的温柔 提交于 2020-12-06 07:27:08
问题 I've got a Gradle project with an additional sourceSet - acceptance . This contains my acceptance tests, as opposed to just build-time unit and integration tests. I also have some helper classes in the standard test sourceSet that I'd like to share, but that don't belong in the main sourceSet. Currently this works fine in Gradle, but IntelliJ doesn't like it and I'm not sure why. My build.gradle looks like this: buildscript { ext { jackson_version = "2.9.0.pr4" // IntelliJ needs M4

Exclude a specific dependency from springBoots `bootJar` gradle task

此生再无相见时 提交于 2020-12-06 02:39:51
问题 I need to exclude a specific dependency from springBoots bootJar gradle task (similar to the provided scope in maven). I tried a custom configuration, but the dependency-which-should-not-be-in-bootJar is still included in the resulting jar. configurations{ provided implementation.extendsFrom provided } dependencies { // ... provided "dependency-which-should-not-be-in-bootJar" } jar { from configurations.compile - configurations.provided from configurations.runtime } bootJar { from

Android Navigation使用

跟風遠走 提交于 2020-12-05 20:52:53
简介 Navigation导航编辑器旨在简化Android开发中导航的实现,可以帮助我们很好的处理Activity和fragment之间通过FragmentTransaction交互的复杂性,也可以很好的处理页面的转场效果;Deeplink的支持,绕过activity直接跳到fragment;并且传递参数更安全。在Android Studio3.2可以使用。 基本使用 引用相关依赖 implementation "android.arch.navigation:navigation-fragment:1.0.0-rc01" // use -ktx for Kotlin implementation "android.arch.navigation:navigation-ui:1.0.0-rc01" 创建资源文件 创建Fragment文件 class IndexFragment : Fragment() { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { return inflater.inflate(R.layout.index_fragment, container, false) } override

相比android原生更好看,而且功能齐全的框架,XUI框架的配置和使用?

牧云@^-^@ 提交于 2020-12-05 18:01:43
这里我建议测试XUI框架的时候,自己先新建一个项目测试一下,避免因为一些其他原因而导致XUI是使用不成功。 XUI框架的配置和使用 第一步:导入XUI框架 第二步:初始化XUI框架 第三步:改变style.xml文件 第四步:在你要调用的文件中初始化画XUI 第一步:导入XUI框架 XUI的官网地址是: XUI官网 首先先写下载包的仓库地址,找到你build.gradle的第一个文件>-allprojects。加入红色圆圈代码。 代码如下 maven { url 'https://jitpack.io' } 代码如下: implementation 'com.github.xuexiangjys:XUI:1.1.5' 然后点击红色圆框中sync Now 第二步:初始化XUI框架 代码如下: import android . app . Application ; import android . content . Context ; import com . xuexiang . xui . XUI ; public class MyApplication extends Application { private static Context MyContext ; @Override public void onCreate ( ) { super . onCreate (

Error including bouncycastle provider

僤鯓⒐⒋嵵緔 提交于 2020-12-05 12:35:55
问题 I need to use bouncycastle provider library in my project. I have included it the gradle project. apply plugin: 'application' sourceCompatibility = '1.6' version = '1.0.0' mainClassName = 'path.to.main.file' dependencies { compile "org.mariadb.jdbc:mariadb-java-client:+" compile "org.bouncycastle:bcprov-jdk16:+" compile "commons-codec:commons-codec:+" testCompile "junit:junit:+" } The project build successfully. But when I try to run the project. It is not able to find the bouncycastle

“Starting Gradle daemon” loop creating endless processes

南楼画角 提交于 2020-12-05 11:51:06
问题 Whenever I open or create a project in Android Studio, and it starts to do its background build or whatever, it gets to "Starting Gradle daemon", but gets in a loop and never stops repeating that step. As a result, the build never finishes and it keeps creating Gradle daemon processes until the system runs out of memory and freezes. This is in Ubuntu. It did work previously, and I don't know what could have changed to make it start happening. Has anyone else run into this problem and been

开发者实测 M1 芯片:除了大型应用程序启动慢点,整体性能优秀!

限于喜欢 提交于 2020-12-05 11:07:41
来源|CSDN 作者|Peter 译者|弯月 苹果新出的M1芯片推出已经有一段时间了,这个让人兴奋的Mac专用芯片对于开发者来说究竟是不是友好?PSPDFKit的创始人、开发者Peter Steinberger购置了一台新版MacBook Air,从开发者的角度进行了测试。测试结果如何?快来看看吧!‍‍‍ 以下为译文: 最近大家都因为苹果的新 M1 芯片而兴奋不已。我也买了一台 MacBook Air 16GB M1 版,想看看是否能当作主力开发机使用。下面是我在测试了一个星期之后的报告。 01 Xcode Xcode 在 M1 上的运行速度非常快。编译 PSPDFKit PDF SDK( debug, arm64 版)几乎能与加载了目前最快的英特尔芯片的 MacBook Pro 媲美, 前者的编译时间是 8 分 49 秒,后者是 7 分 31 秒。 作为比较,我的黑苹果编译同样的项目需要不到5分钟。 对于一台无风扇的机器来说,这已经非常了不起了。苹果的上一款无风扇 MacBook 是 2017 年的 12 寸版本,用它编译同一个项目需要 41 分钟。 绝大多数测试都能通过,尽管我发现了我们之前没有注意到的一些针对 arm64 的错误,因为我们的 CI 并没有真正在 arm64 的硬件上运行过测试。模拟器采用与真实设备同样的架构很有好处,可以帮我们找到更多错误。 iOS 14

Intellij IDEA/Android Studio问题

試著忘記壹切 提交于 2020-12-05 09:13:19
导入一个新项目前,移除主目录下的/.gradle、/.idea文件夹以及iml文件,修改build.gradle为本机的配置。 当遇到 Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.3-all.zip'. Consult IDE log for more details (Help | Show Log)     解决方法:File -> Invalidate caches / Restart 长时间停留在下载,先把网络代理关掉,然后清理缓存。    长时间停留在G radle:Build ,打开能编译通过的项目目录下的gradle/wrapper/gradle-wrapper.properties查看gradle-x.x-all.zip,   修改当前项目对应的配置文件,gradle-wrapper.properties 的最后一行,将版本号x.x改成之前的,    distributionUrl=https\://services.gradle.org/distributions/gradle- x.x -all.zip      同样的方法也适用于卡在Gradle:Resolve

Is it possible to use classes compiled by Gradle buildSrc in main Groovy project?

不问归期 提交于 2020-12-05 07:27:05
问题 Classes compiled by buildSrc/build.gradle are not resolved at runtime when they are used in main PROJECT classes. My Groovy project structure looks like this: -PROJECT -buildSrc/ -build.gradle -/src/main/groovy - com.company.global.test.report -src/test/groovy -build.gradle Is there something I can add to the top-level PROJECT/build.gradle to allow the classes compiled by it to use the classes compiled by buildSrc/build.gradle? 回答1: buildSrc is its own build (not project) that gets executed

Gradle sync failed: Could not find com.android.tools.build:gradle:5.5.1

廉价感情. 提交于 2020-12-05 07:23:54
问题 So, I'm running into an odd issue. I want to upgrade my gradle from version 2.14.1 to 5.5.1 and it won't let me. Here's the error I get: Gradle sync failed: Could not find com.android.tools.build:gradle:5.5.1. Searched in the following locations: - https://jcenter.bintray.com/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/5.5.1/gradle-5.5.1.jar Required by: project : Consult IDE log for more details (Help | Show Log) (1 s 664