Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PushPlatformDemo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengjunjing
PushPlatformDemo
Commits
c53fd5ee
Commit
c53fd5ee
authored
May 31, 2021
by
pengjunjign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:优化导入脚本
parent
070aa09a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
build.gradle
build.gradle
+14
-3
No files found.
build.gradle
View file @
c53fd5ee
...
...
@@ -19,7 +19,7 @@ allprojects {
repositories
{
google
()
mavenCentral
()
maven
{
url
'https://developer.huawei.com/repo/'
}
maven
{
url
'https://developer.huawei.com/repo/'
}
}
}
...
...
@@ -27,9 +27,20 @@ task clean(type: Delete) {
delete
rootProject
.
buildDir
}
/**
* 导入推送模块,如果push目录下为空(包含隐藏文件,.git文件),则初始化子模块,拉取代码.
*/
task
importPushModule
()
{
println
(
"add submodule before"
)
"git submodule init"
.
execute
()
"git submodule update"
.
execute
()
File
pushModuleFile
=
new
File
(
getProjectDir
().
toString
()
+
File
.
separatorChar
+
"push"
)
println
(
"push module:"
+
pushModuleFile
.
toString
())
//push目录下没有任何文件则视为没有初始化子模块
if
(
pushModuleFile
.
listFiles
().
length
==
0
)
{
String
cmd1
=
"git submodule init"
.
execute
().
text
.
trim
()
String
cmd2
=
"git submodule update"
.
execute
().
text
.
trim
()
println
(
cmd1
)
println
(
cmd2
)
println
(
"no init submodule , only init once in project"
)
}
println
(
"add submodule after"
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment