[英]Building shadow jar with gradle locally
I am using shadow plugin in gradle to build jar file, I have added the build script as follows 我在gradle中使用shadow插件构建jar文件,我添加了构建脚本,如下所示
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
}
}
Instead of asking gradle
to fetch shadow-1.2.2.jar from jcenter()
, I want to get the shadow-1.2.2.jar
from http://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/1.2.2/ 我没有要求
gradle
从jcenter()
获取shadow-1.2.2.jar,而是想从http://jcenter.bintray.com/com/github/jengelman/gradle/plugins获取shadow-1.2.2.jar
。 /shadow/1.2.2/
I just want to build it locally, I have put the shadow-1.2.2.jar
in libs folder and my build script is 我只想在本地构建它,将
shadow-1.2.2.jar
放在libs文件夹中,并且构建脚本是
buildscript {
//repositories { jcenter() }
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.2'
}
}
But it not working please help! 但是它不起作用,请帮忙!
The following piece of code should work: 以下代码应该可以工作:
buildscript {
dependencies {
classpath fileTree(dir: 'libs', include: '*.jar')
}
}
There's no compile
configuration for gradle buildscript
dependencies. gradle
buildscript
依赖项没有compile
配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.