diff --git a/README.md b/README.md index 183b6f43..61026129 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# AndroidStudy +# AndroidStudy 111 222 # 扫描二维码下载APK示例: ![image](http://upload-images.jianshu.io/upload_images/587163-f258a65074ff6b36.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -# 更新日志: +# 更新日志:333 444 **2017/06/19** Android仿QQ小红点 ( http://www.jianshu.com/p/9f0736c24029 ) diff --git a/app/build.gradle b/app/build.gradle index 2b701d0f..4a925817 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'com.android.application' -//获取时间戳 +//获取时间戳 交付pipeline def getDate() { def date = new Date() def formattedDate = date.format('yyyyMMddHHmm') diff --git a/app/src/androidTest/java/org/ninetripods/mq/study/ExampleInstrumentedTest.java b/app/src/androidTest/java/org/ninetripods/mq/study/ExampleInstrumentedTest.java index 4c43572e..66bf7236 100644 --- a/app/src/androidTest/java/org/ninetripods/mq/study/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/org/ninetripods/mq/study/ExampleInstrumentedTest.java @@ -18,7 +18,7 @@ public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { - // Context of the app under test. + // Context of the app under test. test 流水线 00 Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("org.ninetripods.mq.circleview", appContext.getPackageName()); diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 00000000..14ea4943 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout([$class: 'GitSCM', + branches: [[name: '*/main']], + userRemoteConfigs: [[url: 'https://github.com/username/my-android-app.git']]]) + } + } + + stage('Build') { + steps { + sh './gradlew assembleDebug' + } + } + + stage('Test') { + steps { + sh './gradlew test' + } + } + + stage('Lint') { + steps { + sh './gradlew lint' + } + } + + stage('Publish') { + steps { + sh './gradlew assembleRelease' + archiveArtifacts artifacts: 'app/build/outputs/apk/release/*.apk', fingerprint: true + } + } + } + + post { + always { + cleanWs() + } + } +}