flutter android grandle buid.gradle

build setting

buildscript {
   ext.kotlin_version = '1.5.20'
   repositories {
       // google()
       // mavenCentral()
       maven{ url 'https://maven.aliyun.com/repository/central' }
       maven{ url 'https://maven.aliyun.com/repository/public' }
       maven{ url 'https://maven.aliyun.com/repository/google' }
       maven{ url 'https://maven.aliyun.com/repository/gradle-plugin' }
   }

   dependencies {
       classpath 'com.android.tools.build:gradle:7.0.1'
       classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
   }
}

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' }
       maven{ url 'https://maven.aliyun.com/repository/gradle-plugin' }
   }
}

rootProject.buildDir = '../build'
subprojects {
   project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
   project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
   delete rootProject.buildDir
}

posted @ 2024-01-13 19:30  vx_guanchaoguo0  阅读(4)  评论(0编辑  收藏  举报