Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2fed0b3e authored by Tobias Kaminsky's avatar Tobias Kaminsky Committed by GitHub
Browse files

Merge pull request #75 from nextcloud/lint

add lint, with drone & remember results
parents 6f3211a8 b992e221
Loading
Loading
Loading
Loading
+16 −5
Original line number Diff line number Diff line
pipeline:
  test:
    image: nextcloudci/android:android-15
    image: nextcloudci/android:android-30
    commands:
      - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
      - emulator -avd test -no-window &
      - ./wait_for_emulator.sh
      # - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
      # - emulator -avd test -no-window &
      # - ./wait_for_emulator.sh
      # build app 
      - ./gradlew clean build

    environment:
      - ANDROID_TARGET=android-24
      - ANDROID_TARGET=android-28
      - ANDROID_ABI=armeabi-v7a
      - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/

  lint:
    image: nextcloudci/android:android-30
    commands:
      # needs gplay
      - sed -i '/com.google.*.gms/s/^.*\\/\\///g' build.gradle
      - export BRANCH=$(scripts/lint/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
      - scripts/lint/lint-up-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER
    secrets: [ GIT_USERNAME, GIT_TOKEN, LOG_USERNAME, LOG_PASSWORD ]

branches: master
+8 −5
Original line number Diff line number Diff line
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.android.tools.build:gradle:3.0.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
    }
}
@@ -11,17 +12,16 @@ buildscript {
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.nextcloud'

repositories {
    jcenter()
    google()
}

dependencies {
    compile 'org.apache.jackrabbit:jackrabbit-webdav:2.12.6'
    compile 'org.parceler:parceler-api:1.1.6'
    implementation 'org.parceler:parceler-api:1.1.6'
    annotationProcessor 'org.parceler:parceler:1.1.6'
    compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
}

android {
@@ -54,5 +54,8 @@ android {

    lintOptions {
        abortOnError false
        htmlReport true
        htmlOutput file("$project.buildDir/reports/lint/lint.html")
        disable 'MissingTranslation'
    }
}
+2 −2
Original line number Diff line number Diff line
#Mon Mar 27 15:45:10 CST 2017
#Tue Nov 14 11:01:51 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+21 −14
Original line number Diff line number Diff line
@@ -27,20 +27,27 @@
          package="com.owncloud.android.lib.sampleclient"
          android:versionCode="1"
          android:versionName="1.0">

    <uses-permission android:name="android.permission.INTERNET"/>

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="24"/>
    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <activity 	android:name="MainActivity"
                  	android:label="@string/app_name"
					android:screenOrientation="portrait"

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name">
        <activity
            android:name="com.owncloud.android.lib.sampleclient.MainActivity"
            android:configChanges="orientation|keyboardHidden"
                  >
            android:label="@string/app_name"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>
+3 −2
Original line number Diff line number Diff line
@@ -2,15 +2,16 @@ apply plugin: 'com.android.application'

repositories {
    jcenter()
    google()
}

dependencies {
    compile project(':')
    implementation project(':')
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.0'
    buildToolsVersion '26.0.2'

    sourceSets {
        main {
Loading