我无法解决SNAPSHOT依赖项。我已经将项目发布到oss sonatype
我的主类:
package com.github.sitrakary.unitconvert.gui;
// import a class from the SNAPSHOT dependencies.
import com.github.sitrakary.unitconvert.Converter; // Can't resolve 'Converter'
public class App {
public static void main(String args[]) {
System.out.println();
}
}
Gradle构建文件:
group 'com.github.sitrakary'
version '0.1-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.github.sitrakary', name:'unit-converter', version:'1.0-SNAPSHOT', changing: true
testCompile group: 'junit', name: 'junit', version: '4.12'
}
错误
Information:java: Errors occurred while compiling module 'unit-converter-gui_main'
Information:javac 9.0.1 was used to compile java sources
Information:Module "unit-converter-gui_main" was fully rebuilt due to project configuration/dependencies changes
Information:26/01/2018 12:30 - Compilation completed with 1 error and 0 warnings in 3s 470ms
Error:java: Illegal char <:> at index 84: C:\Users\Sitraka\IdeaProjects\unit-converter-gui\Could not find com.github.sitrakary:unit-converter:1.0-SNAPSHOT.