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

Commit 3a77f0c2 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

944-update_with_upstream

parent c13d16a9
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
  push:
    branches: [ "main" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main" ]
  schedule:
    - cron: '39 11 * * 0'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'java' ]
        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
        # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

    steps:
    - name: Checkout repository
      uses: actions/checkout@v3

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.

        # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
        # queries: security-extended,security-and-quality


    # Autobuild attempts to build any compiled languages  (C/C++, C#, Go, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v2

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

    #   If the Autobuild fails above, remove it and uncomment the following three lines.
    #   modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

    # - run: |
    #   echo "Run, Build Application using script"
    #   ./location_of_script_within_repo/buildscript.sh

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v2
      with:
        category: "/language:${{matrix.language}}"
+6 −5
Original line number Diff line number Diff line
@@ -40,11 +40,12 @@ jobs:
          submodules: true
      - uses: gradle/wrapper-validation-action@v1

      - name: Cache gradle dependencies
      - name: Cache APKs and gradle dependencies
        uses: actions/cache@v2
        with:
          key: ${{ runner.os }}-1
          path: |
            ~/.apk
            ~/.gradle/caches
            ~/.gradle/wrapper

@@ -52,10 +53,10 @@ jobs:
        run: start-emulator.sh
      - name: Install task apps
        run: |
          mkdir apk && cd apk
          wget -q -O org.dmfs.tasks.apk https://f-droid.org/archive/org.dmfs.tasks_80800.apk && adb install org.dmfs.tasks.apk
          wget -q -O org.tasks.apk https://f-droid.org/archive/org.tasks_120400.apk && adb install org.tasks.apk
          wget -q -O at.techbee.jtx.apk https://f-droid.org/archive/at.techbee.jtx_100140002.apk && adb install at.techbee.jtx.apk
          mkdir .apk && cd .apk
          wget -cq -O org.dmfs.tasks.apk https://f-droid.org/archive/org.dmfs.tasks_80800.apk && adb install org.dmfs.tasks.apk
          wget -cq -O org.tasks.apk https://f-droid.org/archive/org.tasks_120400.apk && adb install org.tasks.apk
          wget -cq -O at.techbee.jtx.apk https://f-droid.org/archive/at.techbee.jtx_100140002.apk && adb install at.techbee.jtx.apk
          cd ..
      - name: Run connected tests
        run: ./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest
+6 −13
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@

buildscript {
    ext.versions = [
        kotlin: '1.7.10',
        dokka: '1.5.0',
        kotlin: '1.7.20',
        dokka: '1.7.20',
        ical4j: '3.2.5',
        // latest Apache Commons versions that don't require Java 8 (Android 7)
        commonsIO: '2.6'
@@ -17,7 +17,7 @@ buildscript {
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.0'
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
        classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
    }
@@ -45,6 +45,8 @@ android {
        buildConfigField "String", "version_ical4j", "\"${versions.ical4j}\""
    }

    namespace 'at.bitfire.ical4android'

    compileOptions {
        // ical4j >= 3.x uses the Java 8 Time API
        coreLibraryDesugaringEnabled true
@@ -67,15 +69,6 @@ android {
    sourceSets {
        main.java.srcDirs = [ "src/main/java", "opentasks-contract/src/main/java" ]
    }

    // TODO currently doesn't work with dokka 1.5.0, but dokka 0.10.1 doesn't work with new gradle
    /*dokka.configuration {
        sourceLink {
            url = "https://gitlab.com/bitfireAT/ical4android/tree/master/"
            lineSuffix = "#L"
        }
        jdkVersion = 8
    }*/
}

dependencies {
@@ -99,7 +92,7 @@ dependencies {
    // noinspection GradleDependency
    implementation "commons-io:commons-io:${versions.commonsIO}"

    implementation 'org.slf4j:slf4j-jdk14:1.7.36'
    implementation 'org.slf4j:slf4j-jdk14:2.0.3'
    implementation 'androidx.core:core-ktx:1.9.0'

    androidTestImplementation 'androidx.test:core:1.4.0'
+11 −2
Original line number Diff line number Diff line
@@ -384,13 +384,22 @@ public final class TaskContract
        String LIST_COLOR = "list_color";

        /**
         * The access level a user has on this list. <strong>This value is not used yet, sync adapters should set it to <code>0</code></strong>.
         * The access level a user has on this list (taken from android.provider.CalendarContract).
         * <p>
         * Value: Integer
         * Value: Integer (one of the values below)
         * </p>
         */
        String ACCESS_LEVEL = "list_access_level";

        /** Not specified by client, should be treated as read-write */
        Integer ACCESS_LEVEL_UNDEFINED = 0;

        /** Can read all tasks and details, no write access */
        Integer ACCESS_LEVEL_READ = 200;

        /** Full access to the tasks list */
        Integer ACCESS_LEVEL_OWNER = 700;

        /**
         * Indicates that a task list is set to be visible.
         * <p>
+1 −2
Original line number Diff line number Diff line
@@ -10,8 +10,7 @@
  ~ PURPOSE.  See the GNU General Public License for more details.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="at.bitfire.ical4android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- read/write Android calendars -->
    <uses-permission android:name="android.permission.READ_CALENDAR" />
Loading