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

Unverified Commit ba178cda authored by Artur's avatar Artur Committed by GitHub
Browse files

Merge pull request #62 from nextcloud/master

rebase
parents 6060f4b0 89c68761
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ name: tests

steps:
  - name: gplay
    image: nextcloudci/android:android-49
    image: ghcr.io/nextcloud/continuous-integration-androidandroidbase:5
    environment:
      LOG_USERNAME:
        from_secret: LOG_USERNAME
@@ -45,7 +45,7 @@ name: analysis

steps:
  - name: analysis
    image: nextcloudci/android:android-50
    image: ghcr.io/nextcloud/continuous-integration-androidandroidbase:5
    environment:
      GIT_USERNAME:
        from_secret: GIT_USERNAME
@@ -86,4 +86,5 @@ trigger:
  branch:
    - master
  event:
    - push
    - pull_request
+19 −9
Original line number Diff line number Diff line
name: Auto approve
on: pull_request
name: Dependabot
on: pull_request_target

jobs:
    auto-approve:
  auto-merge:
    runs-on: ubuntu-latest
    steps:
      # Default github action approve
      - uses: hmarr/auto-approve-action@v2.0.0
              if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
        if: github.ref == 'refs/heads/master' &&
          (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
        with:
                  github-token: "${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}"
          github-token: ${{ secrets.GITHUB_TOKEN }}

      # Nextcloud bot approve and merge request
      - uses: ahmadnassri/action-dependabot-auto-merge@v2
        if: github.ref == 'refs/heads/master' &&
          (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
        with:
          target: minor
          github-token: ${{ secrets.DEPENDABOT_AUTOMERGE_TOKEN }}
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
host = https://www.transifex.com

[nextcloud.android-singlesignon]
file_filter = src/main/res/values-<lang>/strings.xml
source_file = src/main/res/values/strings.xml
file_filter = lib/src/main/res/values-<lang>/strings.xml
source_file = lib/src/main/res/values/strings.xml
type = ANDROID
source_lang = en
lang_map = af_ZA: af-rZA, am_ET: am-rET, ar_AE: ar-rAE, ar_BH: ar-rBH, ar_DZ: ar-rDZ, ar_EG: ar-rEG, ar_IQ: ar-rIQ, ar_JO: ar-rJO, ar_KW: ar-rKW, ar_LB: ar-rLB, ar_LY: ar-rLY, ar_MA: ar-rMA, ar_OM: ar-rOM, ar_QA: ar-rQA, ar_SA: ar-rSA, ar_SY: ar-rSY, ar_TN: ar-rTN, ar_YE: ar-rYE, arn_CL: arn-rCL, as_IN: as-rIN, az_AZ: az-rAZ, ba_RU: ba-rRU, be_BY: be-rBY, bg_BG: bg-rBG, bn_BD: bn-rBD, bn_IN: bn-rIN, bo_CN: bo-rCN, br_FR: br-rFR, bs_BA: bs-rBA, ca_ES: ca-rES, co_FR: co-rFR, cs_CZ: cs-rCZ, cy_GB: cy-rGB, da_DK: da-rDK, de_AT: de-rAT, de_CH: de-rCH, de_DE: de-rDE, de_LI: de-rLI, de_LU: de-rLU, dsb_DE: dsb-rDE, dv_MV: dv-rMV, el_GR: el-rGR, en_AU: en-rAU, en_BZ: en-rBZ, en_CA: en-rCA, en_GB: b+en+001, en_IE: en-rIE, en_IN: en-rIN, en_JM: en-rJM, en_MY: en-rMY, en_NZ: en-rNZ, en_PH: en-rPH, en_SG: en-rSG, en_TT: en-rTT, en_US: en-rUS, en_ZA: en-rZA, en_ZW: en-rZW, en@pirate: en-rpirate, es_AR: es-rAR, es_BO: es-rBO, es_CL: es-rCL, es_CO: es-rCO, es_CR: es-rCR, es_DO: es-rDO, es_EC: es-rEC, es_ES: es-rES, es_GT: es-rGT, es_HN: es-rHN, es_MX: es-rMX, es_NI: es-rNI, es_PA: es-rPA, es_PE: es-rPE, es_PR: es-rPR, es_PY: es-rPY, es_SV: es-rSV, es_419: b+es+419, es_UY: es-rUY, es_VE: es-rVE, et_EE: et-rEE, eu_ES: eu-rES, fa_IR: fa-rIR, fi_FI: fi-rFI, fil_PH: fil-rPH, fo_FO: fo-rFO, fr_BE: fr-rBE, fr_CA: fr-rCA, fr_CH: fr-rCH, fr_FR: fr-rFR, fr_LU: fr-rLU, fr_MC: fr-rMC, fy_NL: fy-rNL, ga_IE: ga-rIE, gd_GB: gd-rGB, gl_ES: gl-rES, gsw_FR: gsw-rFR, gu_IN: gu-rIN, ha_NG: ha-rNG, he: iw, he_IL: he-rIL, hi_IN: hi-rIN, hr_BA: hr-rBA, hr_HR: hr-rHR, hsb_DE: hsb-rDE, hu_HU: hu-rHU, hy_AM: hy-rAM, id: in, id_ID: id-rID, ig_NG: ig-rNG, ii_CN: ii-rCN, is_IS: is-rIS, it_CH: it-rCH, it_IT: it-rIT, iu_CA: iu-rCA, ja_JP: ja-rJP, ka_GE: ka-rGE, kk_KZ: kk-rKZ, kl_GL: kl-rGL, km_KH: km-rKH, kn_IN: kn-rIN, ko_KR: ko-rKR, kok_IN: kok-rIN, ku_IQ: ku-rIQ, ky_KG: ky-rKG, lb_LU: lb-rLU, lo_LA: lo-rLA, lt_LT: lt-rLT, lv_LV: lv-rLV, mi_NZ: mi-rNZ, mk_MK: mk-rMK, ml_IN: ml-rIN, mn_CN: mn-rCN, mn_MN: mn-rMN, moh_CA: moh-rCA, mr_IN: mr-rIN, ms_BN: ms-rBN, ms_MY: ms-rMY, my_MM: my, mt_MT: mt-rMT, nb_NO: nb-rNO, ne_NP: ne-rNP, nl_BE: nl-rBE, nl_NL: nl-rNL, nn_NO: nn-rNO, nso_ZA: nso-rZA, oc_FR: oc-rFR, or_IN: or-rIN, pa_IN: pa-rIN, pl_PL: pl-rPL, prs_AF: prs-rAF, ps_AF: ps-rAF, pt_BR: pt-rBR, pt_PT: pt-rPT, qut_GT: qut-rGT, quz_BO: quz-rBO, quz_EC: quz-rEC, quz_PE: quz-rPE, rm_CH: rm-rCH, ro_RO: ro-rRO, ru_RU: ru-rRU, rw_RW: rw-rRW, sa_IN: sa-rIN, sah_RU: sah-rRU, se_FI: se-rFI, se_NO: se-rNO, se_SE: se-rSE, si_LK: si-rLK, sk_SK: sk-rSK, sl_SI: sl-rSI, sma_NO: sma-rNO, sma_SE: sma-rSE, smj_NO: smj-rNO, smj_SE: smj-rSE, smn_FI: smn-rFI, sms_FI: sms-rFI, sq_AL: sq-rAL, sr_BA: sr-rBA, sr_CS: sr-rCS, sr_ME: sr-rME, sr_RS: sr-rRS, sr@latin: sr-rSP, sv_FI: sv-rFI, sv_SE: sv-rSE, sw_KE: sw-rKE, syr_SY: syr-rSY, ta_IN: ta-rIN, ta_LK: ta-rLK, te_IN: te-rIN, tg_TJ: tg-rTJ, th_TH: th-rTH, tk_TM: tk-rTM, tn_ZA: tn-rZA, tr_TR: tr-rTR, tt_RU: tt-rRU, tzm_DZ: tzm-rDZ, ug_CN: ug-rCN, uk_UA: uk-rUA, ur_PK: ur-rPK, uz_UZ: uz-rUZ, vi_VN: vi-rVN, wo_SN: wo-rSN, xh_ZA: xh-rZA, yo_NG: yo-rNG, zh_CN: zh-rCN, zh_CN.GB2312:zh-rBG, zh_HK: zh-rHK, zh_MO: zh-rMO, zh_SG: zh-rSG, zh_TW: zh-rTW, zu_ZA: zu-rZA
+87 −152

File changed.

Preview size limit exceeded, changes collapsed.

+14 −132
Original line number Diff line number Diff line
import com.github.spotbugs.snom.SpotBugsTask

buildscript {
    ext {
        kotlin_version = '1.4.21-2'
        kotlin_version = '1.6.10'
    }
    repositories {
        google()
        jcenter()
        maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots/'
        }
@@ -16,139 +13,24 @@ buildscript {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.6.0'
        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.15.0"
        classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0"
    }
}

allprojects {
    repositories {
        google()
    jcenter()
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.github.spotbugs"
apply plugin: "io.gitlab.arturbosch.detekt"

group = 'com.github.nextcloud'

spotbugs {
    toolVersion = '3.1.12'
}

configurations {
    ktlint
}

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName '1.0'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
        // translations are imported from transifex, so no need to check here
        disable 'MissingTranslation'
        disable 'ExtraTranslation'
        disable 'MissingQuantity'
        disable 'InconsistentArrays'
        disable 'TypographyEllipsis'
        disable 'GradleDependency'
        disable 'VectorPath'
        disable 'IconMissingDensityFolder'
        disable 'IconDensities'
        abortOnError false
        htmlReport true
        htmlOutput file("$project.buildDir/reports/lint/lint.html")
    }
    productFlavors {
    }

    tasks.register("spotbugsDebugReport", SpotBugsTask) {
        ignoreFailures = true
        effort = "max"
        reportLevel = "medium"
        classes = fileTree("$project.buildDir/intermediates/javac/debug/classes/")
        excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")

        reports {
            xml.enabled = false
            html {
                enabled = true
                destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
            }
        }
    }
}

task ktlint(type: JavaExec, group: "verification") {
    description = "Check Kotlin code style."
    main = "com.pinterest.ktlint.Main"
    classpath = configurations.ktlint
    args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
}

task ktlintFormat(type: JavaExec, group: "formatting") {
    description = "Fix Kotlin code style deviations."
    main = "com.pinterest.ktlint.Main"
    classpath = configurations.ktlint
    args "-F", "src/**/*.kt"
}

detekt {
    reports {
        xml {
            enabled = false
        maven { url "https://jitpack.io" }
        mavenCentral()
        maven {
            url 'https://plugins.gradle.org/m2/'
        }
    }
    config = files("detekt.yml")
    input = files("src/")
}

dependencies {

    implementation "androidx.appcompat:appcompat:1.2.0"
    implementation 'androidx.annotation:annotation:1.1.0'
    implementation 'androidx.core:core:1.3.2'
    implementation 'androidx.fragment:fragment:1.2.5'

    compileOnly "org.projectlombok:lombok:1.18.16"
    annotationProcessor "org.projectlombok:lombok:1.18.16"

    api 'com.google.code.gson:gson:2.8.6'

    implementation 'io.reactivex.rxjava2:rxjava:2.2.20'

    implementation 'commons-io:commons-io:2.8.0'

    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.okhttp3:okhttp:3.14.9'

    spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
    spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.7'

    ktlint "com.pinterest:ktlint:0.40.0"

    // Required for local unit tests (JUnit 4 framework)
    testImplementation 'junit:junit:4.13.1'
    // required if you want to use Mockito for unit tests
    testImplementation 'org.mockito:mockito-core:3.7.7'
}
apply plugin: "com.github.spotbugs"
apply plugin: "io.gitlab.arturbosch.detekt"
apply plugin: 'maven-publish' // needed for JitPack.io
Loading