init.gradle
allprojects {
repositories {
maven {
name 'aliyun'
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
}
}
conf/setting.xml
<localRepository>F:\Program Files\maven\repo</localRepository>
<mirror>
<id>aliyun</id>
<mirrorOf>central</mirrorOf>
<name>aliyun-maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
编译当前目录下的libs文件夹里的文件
compile fileTree(dir:'libs',include:['*.jar'])
主文件
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'demo3.App'
)
}
}