Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
唐文
/
AiyoZhuaWaWa
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
30770a2f
authored
Nov 30, 2017
by
chengfengpiaopiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jenkins projectName定义
parent
f008a303
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
app/build.gradle
app/build.gradle
View file @
30770a2f
...
...
@@ -46,6 +46,7 @@ def projectName = PROJECT_NAME
def
env
=
ENVIRONMENT
def
packTime
=
getDate
()
def
is_jenkins
=
IS_JENKINS
def
projectNameLowerCase
=
projectName
.
toLowerCase
()
android
{
...
...
@@ -114,18 +115,18 @@ android {
println
(
"is_jenkins: "
+
is_jenkins
)
//build.gralde根据module的个数,执行的次数为module.mount+1
println
(
"projectName: "
+
projectName
)
if
(
"false"
.
equals
(
is_jenkins
))
{
//groovy boolean 如果你把一个对象放在一个boolean表达式中,Groovy 会检查这个对象是否为null. 它会把null当做false,否则为true
fileName
=
"
duobaojingcai
_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk"
fileName
=
"
${projectNameLowerCase}
_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk"
outputFile
=
"G:/Apks/${projectName}"
}
else
{
channelName
=
PRODUCT_FLAAVOR_BUILD
//outputFile = "/vagrant/jenkins/jenkins-workspace/walleApps/${projectName}"
outputFile
=
"/var/jenkins_home/walleApps/${projectName}"
if
(
"release"
.
equals
(
env
))
{
fileName
=
"
duobaojingcai
_${channelName}_v${defaultConfig.versionName}_${env}.apk"
outputFile
=
outputFile
+
"/
release
"
fileName
=
"
${projectNameLowerCase}
_${channelName}_v${defaultConfig.versionName}_${env}.apk"
outputFile
=
outputFile
+
"/
"
+
"${env}
"
}
else
{
fileName
=
"
duobaojingcai
_${channelName}_v${defaultConfig.versionName}_${env}_${packTime}.apk"
outputFile
=
outputFile
+
"/
inside-test
"
fileName
=
"
${projectNameLowerCase}
_${channelName}_v${defaultConfig.versionName}_${env}_${packTime}.apk"
outputFile
=
outputFile
+
"/
"
+
"${env}
"
}
}
createFile
(
outputFile
);
...
...
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