blob: f217598157e52bad59633ec2117f282e531f5a0f [file] [log] [blame]
Dan Albertde30c792021-11-16 16:15:35 -08001buildscript {
2 val snapshotSuffix = if (hasProperty("release")) {
Dan Albert52de4842021-11-29 17:13:40 -08003 // We're still tagging releases as betas until we have more thorough
4 // test automation.
5 "-beta-1"
Dan Albertde30c792021-11-16 16:15:35 -08006 } else {
7 "-SNAPSHOT"
8 }
9
10 extra.apply {
11 set("snapshotSuffix", snapshotSuffix)
12 }
13}
14
Dan Albertdca0d722019-07-16 14:03:43 -070015group = "com.android"
Dan Albertde30c792021-11-16 16:15:35 -080016version = "1.0.0${extra.get("snapshotSuffix")}"
Dan Albertdca0d722019-07-16 14:03:43 -070017
Dan Albert243baa32021-06-10 15:49:06 -070018plugins {
19 distribution
20}
21
Dan Albertdca0d722019-07-16 14:03:43 -070022repositories {
23 mavenCentral()
24 jcenter()
25 google()
Dan Albert19fea2b2020-02-05 12:56:13 -080026}
Dan Albert243baa32021-06-10 15:49:06 -070027
28distributions {
29 main {
30 contents {
31 from("${rootProject.buildDir}/repository")
32 include("**/*.aar")
33 include("**/*.pom")
34 }
35 }
36}
37
Dan Albert85dc9da2021-09-28 16:01:59 -070038tasks {
39 distZip {
40 dependsOn(project.getTasksByName("publish", true))
41 }
42}
43
Dan Albert243baa32021-06-10 15:49:06 -070044tasks.register("release") {
Dan Albert85dc9da2021-09-28 16:01:59 -070045 dependsOn(project.getTasksByName("test", true))
Dan Albert243baa32021-06-10 15:49:06 -070046 dependsOn(":distZip")
47}