Skip to content

Commit

Permalink
feat:更新单独模块上传的脚本 (#167)
Browse files Browse the repository at this point in the history
* update publish script

* update publish script

* update publish script

* update releaseVersion

Co-authored-by: growingio <tianhui@growingio.com>
  • Loading branch information
cpacm and growingio authored Aug 2, 2022
1 parent 103e19e commit 90e4783
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 61 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
module:
description: 'select publish module'
required: true
default: 'autotracker_bom'
default: 'autotracker-bom'
type: choice
options:
- autotracker_bom
- autotracker-bom
- hybrid
- okhttp3
- volley
Expand Down Expand Up @@ -53,6 +53,11 @@ jobs:
chmod +x gradlew
chmod +x gradle/publishAllToMavenLocal.sh
# 构建项目
- name: Build with Gradle
run: |
bash ./gradle/publishAllToMavenLocal.sh
# 解码秘钥
- name: Decode
run: |
Expand Down
87 changes: 31 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,13 @@ buildscript {
releaseConfiguration = [

// bom version
bomVersion : "0.0.0.1",
bomVersionCode : 00001,
bomVersion : "1.0.0.0",
bomVersionCode : 10000,

releaseVersion : "3.4.0",
releaseVersionCode: 30400,
releaseVersion : "3.4.1",
releaseVersionCode: 30401,

pluginVersion : "3.4.0",

trackerVersion : "3.4.0",
autotrackerVersion: "3.4.0",

trackerCore : "3.4.0",
autotrackerCore : "3.4.0",

hybrid : "3.4.0",
okhttp3 : "3.4.0",
urlconnection : "3.4.0",
volley : "3.4.0",
database : "3.4.0",
debugger : "3.4.0",
circler : "3.4.0",
json : "3.4.0",
protobuf : "3.4.0",
encoder : "3.4.0",

analyticsFa : "3.4.0",
analyticsGa : "3.4.0",
analyticsSa : "3.4.0",
oaid : "3.4.0",
crash : "3.4.0",

annotationVersion : "3.4.0",
]

versions = [
Expand Down Expand Up @@ -79,33 +54,33 @@ buildscript {
'autotracker_bom' : "com.growingio.android:autotracker-bom:$releaseConfiguration.bomVersion",

// sdk
'tracker' : "com.growingio.android:tracker:$releaseConfiguration.trackerVersion",
'tracker_cdp' : "com.growingio.android:tracker-cdp:$releaseConfiguration.trackerVersion",
'autotracker' : "com.growingio.android:autotracker:$releaseConfiguration.autotrackerVersion",
'autotracker_cdp' : "com.growingio.android:autotracker-cdp:$releaseConfiguration.autotrackerVersion",

'tracker_core' : "com.growingio.android:tracker-core:$releaseConfiguration.trackerCore",
'autotracker_core': "com.growingio.android:autotracker-core:$releaseConfiguration.autotrackerCore",

'annotation' : "com.growingio.android:annotation:$releaseConfiguration.annotationVersion",
'compiler' : "com.growingio.android:compiler:$releaseConfiguration.annotationVersion",

'hybrid' : "com.growingio.android:hybrid:$releaseConfiguration.hybrid",
'okhttp3' : "com.growingio.android:okhttp3:$releaseConfiguration.okhttp3",
'volley' : "com.growingio.android:volley:$releaseConfiguration.volley",
'urlconnection' : "com.growingio.android:urlconnection:$releaseConfiguration.urlconnection",
'database' : "com.growingio.android:database:$releaseConfiguration.database",
'debugger' : "com.growingio.android:debugger:$releaseConfiguration.debugger",
'circler' : "com.growingio.android:circler:$releaseConfiguration.circler",
'json' : "com.growingio.android:json:$releaseConfiguration.json",
'protobuf' : "com.growingio.android:protobuf:$releaseConfiguration.protobuf",
'encoder' : "com.growingio.android:encoder:$releaseConfiguration.encoder",
'oaid' : "com.growingio.android:oaid:$releaseConfiguration.oaid",
'analytics_fa' : "com.growingio.android:analytics-fa:$releaseConfiguration.analyticsFa",
'analytics_ga' : "com.growingio.android:analytics-ga:$releaseConfiguration.analyticsGa",
'analytics_sa' : "com.growingio.android:analytics-ga:$releaseConfiguration.analyticsSa",

'crash' : "com.growingio.android:crash:$releaseConfiguration.crash",
'tracker' : "com.growingio.android:tracker:$releaseConfiguration.releaseVersion",
'tracker_cdp' : "com.growingio.android:tracker-cdp:$releaseConfiguration.releaseVersion",
'autotracker' : "com.growingio.android:autotracker:$releaseConfiguration.releaseVersion",
'autotracker_cdp' : "com.growingio.android:autotracker-cdp:$releaseConfiguration.releaseVersion",

'tracker_core' : "com.growingio.android:tracker-core:$releaseConfiguration.releaseVersion",
'autotracker_core': "com.growingio.android:autotracker-core:$releaseConfiguration.releaseVersion",

'annotation' : "com.growingio.android:annotation:$releaseConfiguration.releaseVersion",
'compiler' : "com.growingio.android:compiler:$releaseConfiguration.releaseVersion",

'hybrid' : "com.growingio.android:hybrid:$releaseConfiguration.releaseVersion",
'okhttp3' : "com.growingio.android:okhttp3:$releaseConfiguration.releaseVersion",
'volley' : "com.growingio.android:volley:$releaseConfiguration.releaseVersion",
'urlconnection' : "com.growingio.android:urlconnection:$releaseConfiguration.releaseVersion",
'database' : "com.growingio.android:database:$releaseConfiguration.releaseVersion",
'debugger' : "com.growingio.android:debugger:$releaseConfiguration.releaseVersion",
'circler' : "com.growingio.android:circler:$releaseConfiguration.releaseVersion",
'json' : "com.growingio.android:json:$releaseConfiguration.releaseVersion",
'protobuf' : "com.growingio.android:protobuf:$releaseConfiguration.releaseVersion",
'encoder' : "com.growingio.android:encoder:$releaseConfiguration.releaseVersion",
'oaid' : "com.growingio.android:oaid:$releaseConfiguration.releaseVersion",
'analytics_fa' : "com.growingio.android:analytics-fa:$releaseConfiguration.releaseVersion",
'analytics_ga' : "com.growingio.android:analytics-ga:$releaseConfiguration.releaseVersion",
'analytics_sa' : "com.growingio.android:analytics-ga:$releaseConfiguration.releaseVersion",

'crash' : "com.growingio.android:crash:$releaseConfiguration.releaseVersion",
'snappy' : "com.growingio.android:snappy:1.1.0",
'gmonitor' : 'com.growingio.android:gmonitor:1.5.0',
],
Expand Down
7 changes: 4 additions & 3 deletions gradle/existDenpendices.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ tasks.withType(PublishToMavenRepository) {
def version = getModuleVersion(moduleId)
if (project.hasProperty('CI_SELECT_MODULE') && project.hasProperty("CI_SELECT_VERSION")) {
def cmdModuleId = CI_SELECT_MODULE
if (cmdModuleId != moduleId) return {
println("can't match module:" + cmdModuleId)
false
if (cmdModuleId != moduleId) {
println("can't match module:" + moduleId + " with ==> "+ cmdModuleId)
return false
}
if (CI_SELECT_VERSION != "DEFAULT") version = CI_SELECT_VERSION
moduleId = cmdModuleId
Expand All @@ -66,6 +66,7 @@ tasks.withType(PublishToMavenRepository) {
println String.format("%s:%s already exist in release maven repository, you should't publish it.", moduleId, version)
return false
}

return true

}
Expand Down

0 comments on commit 90e4783

Please sign in to comment.