簡體   English   中英

Gradle構建:com.android.library和spring-boot兼容性

[英]Gradle build: com.android.library and spring-boot compatability

我有以下問題。 我有一個Spring-boot驅動的服務器,我在我的linux主機上構建。 現在我需要在Android設備上啟動它以進行測試(由於我們的測試框架的限制)。

我已經應用了spring-boot和android-library插件:

apply plugin: 'com.android.library'
apply plugin: 'spring-boot'

我收到一個錯誤:

> The 'java' plugin has been applied, but it
  is not compatible with the Android plugins.

但問題是我沒有明確地應用java插件。 那為什么會這樣呢? spring-boot是否會默默地應用它? 或者它可以是gradle腳本中隱含應用它的一些選項嗎?

是的,spring-boot插件默認使用java-plugin。 我沒有在文檔中找到它,但可以在插件的源代碼中看到它

它適用於這一行:

project.getPlugins().apply(JavaPlugin.class);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM