Fix jenkinsfile

This commit is contained in:
William Brawner 2018-09-04 19:45:01 -05:00 committed by William Brawner
parent 527373d3e2
commit 29fb166756
8 changed files with 50 additions and 38 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ app/samsung
*~
*.log
app/acra.properties
keystore.properties

27
Jenkinsfile vendored
View file

@ -3,12 +3,22 @@ pipeline {
stages {
stage('Config') {
steps {
withCredentials([file(
credentialsId: '23ecf53c-2fc9-41ed-abfa-0b32d60d688f',
configFileProvider([
configFile(
fileId: 'ce0fea29-ab06-4921-8ff9-11b09ec8705b',
variable: 'ACRA_PROPERTIES_FILE'
)]) {
)
]) {
sh 'cp "$ACRA_PROPERTIES_FILE" app/acra.properties'
}
configFileProvider([
configFile(
fileId: '9f7d74a1-0971-41b7-8984-ac875ad6301f',
variable: 'KEYSTORE_PROPERTIES'
)
]) {
sh 'cp "$KEYSTORE_PROPERTIES" keystore.properties'
}
}
}
stage('Build') {
@ -16,15 +26,10 @@ pipeline {
sh './gradlew assembleRelease test'
}
}
stage('Sign & Archive') {
stage('Archive') {
steps {
[
$class : 'SignApksBuilder',
apksToSign: 'app/build/outputs/apk/*/release/*.apk',
keyAlias : 'simplemarkdown',
keyStoreId: '44651a2a-1e46-4708-80ab-d8befc6e94f0'
]
archiveArtifacts 'app/build/outputs/mapping'
archiveArtifacts 'app/build/outputs/apk/*/release/*.apk'
archiveArtifacts 'app/build/outputs/mapping/**'
}
}
stage('Report') {

View file

@ -1,8 +1,12 @@
apply plugin: 'com.android.application'
Properties acra = new Properties()
def acra = new Properties()
acra.load(new FileInputStream("app/acra.properties"))
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
@ -24,17 +28,26 @@ android {
applicationId "com.wbrawner.simplemarkdown"
minSdkVersion 19
targetSdkVersion 28
versionCode 15
versionName "0.5.0"
versionCode 16
versionName "0.6.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "ACRA_URL", "\"${acra.getProperty("url")}\""
buildConfigField "String", "ACRA_USER", "\"${acra.getProperty("user")}\""
buildConfigField "String", "ACRA_PASS", "\"${acra.getProperty("pass")}\""
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
flavorDimensions "platform"
@ -61,36 +74,29 @@ ext {
}
dependencies {
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
testImplementation 'junit:junit:4.12'
testImplementation "org.robolectric:robolectric:4.0-alpha-3"
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'org.robolectric:robolectric:4.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
implementation "com.android.support:appcompat-v7:$support_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:design:$support_version"
implementation "com.android.support:support-v13:$support_version"
implementation 'com.commonsware.cwac:anddown:0.3.0'
implementation 'com.google.dagger:dagger:2.11'
implementation 'com.jakewharton:butterknife:8.7.0'
implementation 'com.google.dagger:dagger:2.16'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
implementation "ch.acra:acra-http:$acraVersion"
samsungImplementation project(":IAP5Helper")
}

View file

@ -34,7 +34,7 @@ public class MainActivityTests {
@Rule
public ActivityTestRule<MainActivity> mActivityRule =
new ActivityTestRule(MainActivity.class);
new ActivityTestRule<>(MainActivity.class);
@Before
public void setup() {

View file

@ -2,12 +2,11 @@ package com.wbrawner.simplemarkdown.view.activity;
import android.Manifest;
import android.support.test.espresso.DataInteraction;
import android.support.test.espresso.ViewInteraction;
import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.rule.GrantPermissionRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
@ -22,10 +21,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import static android.support.test.InstrumentationRegistry.getInstrumentation;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
import static android.support.test.espresso.Espresso.pressBack;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.replaceText;
@ -36,7 +33,6 @@ import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anything;
import static org.hamcrest.Matchers.is;
@LargeTest

View file

@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View file

@ -1,6 +1,6 @@
#Mon Oct 01 17:32:53 CDT 2018
#Fri Feb 08 21:22:10 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

View file

@ -0,0 +1,4 @@
storePassword=
keyPassword=
keyAlias=
storeFile=