我已经得到了一个足够的gradle文件,但eclipse拒绝承认我尝试导入的依赖性(尽管在实现依赖后刷新了gradle项目)
我的gradle文件缺少buildscript{}
块,但我不熟悉gradle来实现它。我的构建文件是由eclipse自动生成的,所以我不明白为什么它会成为一个问题。
我尝试导入"com.intrinio:sdk:0.0.1"
的build.gradle:
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
compile "com.intrinio:sdk:0.0.1"
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:21.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
答案 0 :(得分:0)
我认为这是你要使用的the lib。
由于它未部署在公共存储库中,您必须手动安装它。从github签出项目并执行以下操作:
安装
要将Intrinio Java SDK安装到本地Maven存储库,只需执行:
mvn install
然后,在您的gradle文件中,在mavenLocal()
部分添加repository
,它应该可以正常工作。