framework.gradle 762 B

1234567891011121314151617181920212223
  1. apply from: "$scriptPath/FrameworkConfig.gradle"
  2. def frameworkJar = getFrameworkJarPath(gradle.gradleUserHomeDir, sdkInt)
  3. gradle.projectsEvaluated {
  4. tasks.withType(JavaCompile).configureEach {
  5. String taskName = it.name
  6. if (taskName.contains("UnitTest") || taskName.contains("AndroidTest")) {
  7. return
  8. }
  9. //println("${getProject()} -> ${it.name}")
  10. //println("${getProject()} add framework jar -> $frameworkJar")
  11. // 对于当前环境(JDK17、Gradle8.2、Android Gradle Plugin 8.1.3)是这句起作用
  12. classpath = files(frameworkJar, classpath)
  13. options.bootstrapClasspath = files(frameworkJar, options.bootstrapClasspath)
  14. }
  15. }
  16. dependencies {
  17. compileOnly files(frameworkJar)
  18. }