android gradle job config xml 如下:
This XML file does not appear to have any style information associated with it. The document tree is shown below.<project><actions/><description/><keepDependencies>false</keepDependencies><properties><com.tikal.hudson.plugins.notification.HudsonNotificationProperty plugin="notification@1.7"><endpoints><com.tikal.hudson.plugins.notification.Endpoint><protocol>HTTP</protocol><format>JSON</format><url>http://10.24.40.107:8080/uranus/buildjob/jenkinsNotify</url></com.tikal.hudson.plugins.notification.Endpoint></endpoints></com.tikal.hudson.plugins.notification.HudsonNotificationProperty><jenkins.model.BuildDiscarderProperty><strategy class="hudson.tasks.LogRotator"><daysToKeep>7</daysToKeep><numToKeep>-1</numToKeep><artifactDaysToKeep>-1</artifactDaysToKeep><artifactNumToKeep>-1</artifactNumToKeep></strategy></jenkins.model.BuildDiscarderProperty></properties><scm class="hudson.plugins.git.GitSCM" plugin="git@2.2.12"><configVersion>2</configVersion><userRemoteConfigs><hudson.plugins.git.UserRemoteConfig><url>http://10.27.97.39/baitest/lxlandroid.git</url><credentialsId>00be9c9f-6fab-45d2-af6f-00a05a0d9316</credentialsId></hudson.plugins.git.UserRemoteConfig></userRemoteConfigs><branches><hudson.plugins.git.BranchSpec><name>*/master</name></hudson.plugins.git.BranchSpec></branches><doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations><submoduleCfg class="list"/><extensions/></scm><assignedNode>gradle</assignedNode><canRoam>false</canRoam><disabled>false</disabled><blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding><blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding><jdk>win7-jdk1.8.101</jdk><triggers/><concurrentBuild>false</concurrentBuild><builders><hudson.plugins.gradle.Gradle plugin="gradle@1.24"><description/><switches/><tasks>build -x lint</tasks><rootBuildScriptDir/><buildFile/><gradleName>win7-2.14.1</gradleName><useWrapper>false</useWrapper><makeExecutable>false</makeExecutable><fromRootBuildScriptDir>true</fromRootBuildScriptDir><useWorkspaceAsHome>false</useWorkspaceAsHome></hudson.plugins.gradle.Gradle><hudson.plugins.sonar.SonarRunnerBuilder plugin="sonar@2.1"><project/><properties>sonar.projectKey=baitest_master_1124154315 sonar.projectName=baitest sonar.projectVersion=6.2 sonar.sources=./ sonar.java.binaries=./ sonar.sourceEncoding=UTF-8 sonar.language=java sonar.java.source=1.8.0_51 sonar.branch=master sonar.junit.reportsPath=/opt/CI/jenkins/workspace/testgit/app/build/test-results/debug/ sonar.jacoco.reportPath=/opt/CI/jenkins/workspace/testgit/app/build/jacoco/testDebugUnitTest.exec sonar.android.lint.report=/opt/CI/jenkins/workspace/testgit/app/build/outputs/lint-results-debug.xml sonar.profile=Android Lint</properties><javaOpts/><jdk>win7-jdk1.8.101</jdk><sonarRunnerName>sonar-scanner-2.9.0.670</sonarRunnerName><task/></hudson.plugins.sonar.SonarRunnerBuilder></builders><publishers/><buildWrappers/></project>
这一块是关于sonar-runner 的配置:
<properties>sonar.projectKey=baitest_master_1124154315 sonar.projectName=baitest sonar.projectVersion=6.2 sonar.sources=./ sonar.java.binaries=./ sonar.sourceEncoding=UTF-8 sonar.language=java sonar.java.source=1.8.0_51 sonar.branch=master sonar.junit.reportsPath=/opt/CI/jenkins/workspace/testgit/app/build/test-results/debug/ sonar.jacoco.reportPath=/opt/CI/jenkins/workspace/testgit/app/build/jacoco/testDebugUnitTest.exec sonar.android.lint.report=/opt/CI/jenkins/workspace/testgit/app/build/outputs/lint-results-debug.xml sonar.profile=Android Lint</properties>
设置了find-bugs.xml, 设置了jacoco.exec 目录 还有编码,sonar版本,语言等参数。
这个job.config.xml 在jenkins上配置页面上的映射: