build.gradle 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import java.nio.file.Paths
  2. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  3. plugins {
  4. id 'com.android.application' version '8.1.3' apply false
  5. id 'com.android.library' version '8.1.3' apply false
  6. // 不要修改kotlin版本
  7. id 'org.jetbrains.kotlin.android' version "1.8.0" apply false
  8. id 'com.google.protobuf' version "0.9.1" apply false
  9. }
  10. tasks.register('clean', Delete) {
  11. delete rootProject.buildDir
  12. }
  13. ext {
  14. configPath = "../Script/config.gradle"
  15. scriptPath = "$rootDir/Script/"
  16. launcherCode = "../Code/"
  17. protobufConfig = "$scriptPath/protobuf.gradle"
  18. protobufNanoConfig = "$scriptPath/protobuf-nano.gradle"
  19. frameworkJarConfig = "$scriptPath/framework.gradle"
  20. aidlCompile = "$scriptPath/AidlCompile.gradle"
  21. frameworkDependencies = "$scriptPath/frameworks_dependencies.gradle"
  22. def raw = Paths.get("raw")
  23. def frameworks = Paths.get("$raw", "frameworks")
  24. def base = Paths.get("$frameworks", "base")
  25. def frameworksLibs = Paths.get("$frameworks", "libs")
  26. systemUiPath = Paths.get("$base", "packages", "SystemUI")
  27. systemUiLibsPath = Paths.get("$frameworksLibs", "systemui")
  28. iconLoaderPath = Paths.get("$systemUiLibsPath", "iconloaderlib")
  29. windowManagerShell = Paths.get("$base", "libs", "WindowManager", "Shell")
  30. launcherPath = Paths.get("$raw", "packages", "apps", "Launcher3")
  31. frameworkAidlCommonPath = Paths.get("$base", "core", "java")
  32. }
  33. allprojects {
  34. gradle.projectsEvaluated {
  35. // 抑制编译警告
  36. tasks.withType(JavaCompile).configureEach {
  37. options.compilerArgs << "-Xlint:-unchecked"
  38. options.compilerArgs << "-Xlint:-deprecation"
  39. options.compilerArgs << "-Xlint:-dep-ann"
  40. }
  41. }
  42. }