1

客户端的此构建文件dev使用 jitpack指定的发布:

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它应该:

在此处输入图像描述

4

0 回答 0