1、把 framework.jar 拷贝到项目的libs 文件夹中
2、项目根目录下的 build.gradle添加
allprojects{
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
Set<File> fileSet
if (options.bootstrapClasspath != null ) {
fileSet = options.bootstrapClasspath.getFiles()
}else {
fileSet = new HashSet<>()
}
List<File> newFileList = new ArrayList<>();
newFileList.add(new File("./app/libs/framework.jar"))
newFileList.addAll(fileSet)
options.bootstrapClasspath = files(
newFileList.toArray()
)
}
}
}
3、app/build.gradle 添加
dependencies {
compileOnly files('libs/framework.jar')
}