-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathversion-adapter.gradle
51 lines (46 loc) · 1.68 KB
/
version-adapter.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ext.useLocalMaven = true
ext.useGithubMaven = false
ext.publishTaskPrefix = "publish-LINK-"
ext.publishK1_3Suffix = "-K1_3"
ext.publishK1_5Suffix = "-K1_5"
ext.publishK1_7Suffix = "-K1_7"
ext.publishAGBT4_2Suffix = "-AGBT4_2"
ext.publishAGBT4Suffix = "-AGBT4"
ext.publishLocalSuffix = "-LOCAL"
ext.k1_3Version = '1.3.72'
ext.k1_5Version = '1.5.0'
ext.k1_7Version = '1.7.10'
ext.AGBT4Version = '4.0.1'
ext.AGBT4_2Version = '4.2.0'
// default
ext.kotlin_version = k1_5Version
ext.kotlin_version_suffix = ext.publishK1_5Suffix
ext.agbt_version = AGBT4_2Version
ext.agbt_version_suffix = ext.publishAGBT4_2Suffix
gradle.startParameter.taskNames.forEach { name ->
if (name.startsWith(publishTaskPrefix)) {
if (name.contains(publishK1_3Suffix)) {
ext.kotlin_version = k1_3Version
ext.kotlin_version_suffix = ext.publishK1_3Suffix
} else if (name.contains(publishK1_5Suffix)) {
ext.kotlin_version = k1_5Version
ext.kotlin_version_suffix = ext.publishK1_5Suffix
} else if (name.contains(publishK1_7Suffix)) {
ext.kotlin_version = k1_7Version
ext.kotlin_version_suffix = ext.publishK1_7Suffix
}
if (name.contains(publishAGBT4_2Suffix)) {
ext.agbt_version = AGBT4_2Version
ext.agbt_version_suffix = ext.publishAGBT4_2Suffix
} else if (name.contains(publishAGBT4Suffix)) {
ext.agbt_version = AGBT4Version
ext.agbt_version_suffix = ext.publishAGBT4Suffix
}
ext.useLocalMaven = name.contains(publishLocalSuffix)
}
}
if (ext.useLocalMaven) {
ext.local_version_suffix = ext.publishLocalSuffix
} else {
ext.local_version_suffix = ''
}