build.gradle 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. google()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:7.0.0'
  9. // NOTE: Do not place your application dependencies here; they belong
  10. // in the individual module build.gradle files
  11. }
  12. }
  13. allprojects {
  14. repositories {
  15. google()
  16. mavenCentral()
  17. maven { url "https://jitpack.io" }
  18. }
  19. gradle.projectsEvaluated {
  20. tasks.withType(JavaCompile) {
  21. options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
  22. }
  23. }
  24. }
  25. task clean(type: Delete) {
  26. delete rootProject.buildDir
  27. }
  28. ext {
  29. android = [
  30. buildTime : getBuildTime(),
  31. //buildTime : "\""+20241221145454+"\"",
  32. validDays : "30",
  33. ]
  34. }
  35. String getBuildTime() {
  36. Date date = new Date();
  37. String dateStr = "\""+date.format("yyyyMMddHHmmss")+"\"";
  38. System.out.println("build time:"+dateStr);
  39. return dateStr;
  40. }