This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-android/build.gradle
2020-04-10 14:35:21 +08:00

61 lines
1.5 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
def needReplaceLocal = true
gradle.startParameter.taskNames.each {
if (it.contains('uploadArchives')) {
needReplaceLocal = false
}
}
if (needReplaceLocal) {
configurations.all {
resolutionStrategy {
dependencySubstitution {
substitute module('pub.doric:core') with project(":doric")
substitute module('pub.doric:devkit') with project(":devkit")
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Properties properties = new Properties()
properties.load(project.rootProject.file('version.properties').newDataInputStream())
ext {
Version = properties.version
}
task publisCore dependsOn(":doric:uploadArchives") {
println "doric published"
}
task publishDevKit dependsOn(publisCore, ":devkit:uploadArchives") {
println "devkit published"
}
task PublishAll dependsOn(publisCore, publishDevKit) {
println "All published"
}