Dan Albert | de30c79 | 2021-11-16 16:15:35 -0800 | [diff] [blame] | 1 | buildscript { |
2 | val snapshotSuffix = if (hasProperty("release")) { | ||||
Dan Albert | 52de484 | 2021-11-29 17:13:40 -0800 | [diff] [blame] | 3 | // We're still tagging releases as betas until we have more thorough |
4 | // test automation. | ||||
5 | "-beta-1" | ||||
Dan Albert | de30c79 | 2021-11-16 16:15:35 -0800 | [diff] [blame] | 6 | } else { |
7 | "-SNAPSHOT" | ||||
8 | } | ||||
9 | |||||
10 | extra.apply { | ||||
11 | set("snapshotSuffix", snapshotSuffix) | ||||
12 | } | ||||
13 | } | ||||
14 | |||||
Dan Albert | dca0d72 | 2019-07-16 14:03:43 -0700 | [diff] [blame] | 15 | group = "com.android" |
Dan Albert | de30c79 | 2021-11-16 16:15:35 -0800 | [diff] [blame] | 16 | version = "1.0.0${extra.get("snapshotSuffix")}" |
Dan Albert | dca0d72 | 2019-07-16 14:03:43 -0700 | [diff] [blame] | 17 | |
Dan Albert | 243baa3 | 2021-06-10 15:49:06 -0700 | [diff] [blame] | 18 | plugins { |
19 | distribution | ||||
20 | } | ||||
21 | |||||
Dan Albert | dca0d72 | 2019-07-16 14:03:43 -0700 | [diff] [blame] | 22 | repositories { |
23 | mavenCentral() | ||||
24 | jcenter() | ||||
25 | google() | ||||
Dan Albert | 19fea2b | 2020-02-05 12:56:13 -0800 | [diff] [blame] | 26 | } |
Dan Albert | 243baa3 | 2021-06-10 15:49:06 -0700 | [diff] [blame] | 27 | |
28 | distributions { | ||||
29 | main { | ||||
30 | contents { | ||||
31 | from("${rootProject.buildDir}/repository") | ||||
32 | include("**/*.aar") | ||||
33 | include("**/*.pom") | ||||
34 | } | ||||
35 | } | ||||
36 | } | ||||
37 | |||||
Dan Albert | 85dc9da | 2021-09-28 16:01:59 -0700 | [diff] [blame] | 38 | tasks { |
39 | distZip { | ||||
40 | dependsOn(project.getTasksByName("publish", true)) | ||||
41 | } | ||||
42 | } | ||||
43 | |||||
Dan Albert | 243baa3 | 2021-06-10 15:49:06 -0700 | [diff] [blame] | 44 | tasks.register("release") { |
Dan Albert | 85dc9da | 2021-09-28 16:01:59 -0700 | [diff] [blame] | 45 | dependsOn(project.getTasksByName("test", true)) |
Dan Albert | 243baa3 | 2021-06-10 15:49:06 -0700 | [diff] [blame] | 46 | dependsOn(":distZip") |
47 | } |