我正在尝试从jitpack下载my little library。我去扔了文档,目前我有以下版本:
buildscript {
ext.ktor_version = "1.1.2"
repositories {
mavenCentral()
jcenter()
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
}
apply plugin: 'maven'
group = 'com.github.dolgopolovwork'
jar {
manifest {
attributes 'Main-Class': 'com.revolut.rest.EndpointKt'
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
repositories {
mavenCentral()
jcenter()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile group: 'com.github.kittinunf.result', name: 'result', version: '1.4.0'
compile group: 'io.github.microutils', name: 'kotlin-logging', version: '1.6.23'
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "io.ktor:ktor-gson:$ktor_version"
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.8.0-beta2'
compile 'org.kodein.di:kodein-di-generic-jvm:6.1.0'
//For tests
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'com.nhaarman', name: 'mockito-kotlin', version: '1.6.0'
testCompile("io.ktor:ktor-server-test-host:$ktor_version")
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
现在,我正在尝试通过以下gradle命令使用此lib:
compile 'com.github.dolgopolovwork:Revolut:e33d782ee3'
e33d782ee3
只是我的最后一次提交。
问题是-我无法导入任何软件包。我可以导入任何传递依赖类,但不能导入我的类。例如:
import com.google.gson.*
工作正常。
import com.revolut.*
无法编译。我可以从“外部库”面板中清楚地看到此软件包:
那怎么了?