build.gradle
ファイルからタスクを抽出して適用するときに問題が発生し、app/root build.gradle
ファイルに戻ります。コンパイラはMarkupBuilder
とJsonSlurper
を解決できますが、以下を解決できません:import org.apache.commons.lang.StringEscapeUtils
。build.gradleから別の.gradleファイルにタスクを移動するときに問題が発生する
私は新しく作成したスクリプト内で、またアプリケーションレベルとプロジェクトレベルで依存関係として追加しようとしました。
'org.apache.commons.lang:commons-lang:3.5'
エラーが
Could not compile script '/project/app/newscript.gradle'.
startup failed:
> script '/project/app/newscript.gradle': 18: unable to resolve class org.apache.commons.lang.StringEscapeUtils
@ line 18, column 1.
import org.apache.commons.lang.StringEscapeUtils
^
1 error
私が何か間違ったことをやっているの下にあるか、これは可能ではないでしょうか?スクリプトをapply script: newscript.gradle
や別のプラグイン(newscript.gradle
)とは別の方法で含める必要がありますか?