// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/public'} maven { url 'https://maven.aliyun.com/repository/google'} //替换google() maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } gradlePluginPortal() google() mavenCentral() maven { url "https://jitpack.io" } } dependencies { classpath 'com.android.tools.build:gradle:7.2.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/public'} maven { url 'https://maven.aliyun.com/repository/google'} //替换google() maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } gradlePluginPortal() google() mavenCentral() maven { url "https://jitpack.io" } } gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } } task clean(type: Delete) { delete rootProject.buildDir } ext { android = [ buildTime : getBuildTime(), //buildTime : "\""+20241221145454+"\"", validDays : "30", ] } String getBuildTime() { Date date = new Date(); String dateStr = "\""+date.format("yyyyMMddHHmmss")+"\""; System.out.println("build time:"+dateStr); return dateStr; }