client的此构建文件使用jitpack指定library的dev
版本:
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'maven'
mainClassName = 'net.bounceme.mordor.hello.client.HelloClient'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
if (!hasProperty(mainClassName)) {
ext.mainClass = mainClassName
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
compile 'com.github.THUFIR:hello_api:dev'
}
jar {
manifest {
attributes ('Main-Class': mainClassName,
"Class-Path": configurations.compile.collect { it.getName() }.join(' '))
}
}
assemble.dependsOn (jar)
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
然而Netbeans显示hello_api-latest.jar
而不是hello_api-dev.jar
应该: