diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 721307296..e50baac4f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -25,7 +25,7 @@ jobs: run: chmod +x gradlew - name: Build with gradle - uses: gradle/gradle-build-action@v2.8.0 + uses: gradle/gradle-build-action@v2.9.0 with: gradle-version: nightly arguments: assembleDebug diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9d326408b..fb13b9649 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,10 +38,10 @@ jobs: run: chmod +x gradlew - name: Build with gradle - uses: gradle/gradle-build-action@v2.8.0 + uses: gradle/gradle-build-action@v2.9.0 with: gradle-version: current arguments: clean assembleDebug --no-build-cache - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bcbe6d42..3a1674858 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: run: chmod +x gradlew - name: Build with gradle - uses: gradle/gradle-build-action@v2.8.0 + uses: gradle/gradle-build-action@v2.9.0 with: gradle-version: nightly arguments: assembleRelease diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5bd54a4e3..c3e6283cd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,6 +21,13 @@ jobs: - name: Give permission to executable run: chmod +x gradlew + - name: Run tests + uses: gradle/gradle-build-action@v2.9.0 + with: + gradle-version: current + arguments: test --continue + + - name: Run tests run: ./gradlew test --continue @@ -30,4 +37,3 @@ jobs: with: name: test-reports path: '**/build/reports/tests/*' - diff --git a/app/.gitignore b/app/.gitignore index 8242d8d25..796b96d1c 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1,3 +1 @@ /build -/src/main/assets/android.jar -/src/main/assets/core-lambda-stubs.jar diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ae52d0a08..1bfb97157 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,7 +21,7 @@ android { minSdk = 26 targetSdk = 34 versionCode = 23 - versionName = "2.2.1" + versionName = "2.0.3" buildConfigField("String", "GIT_COMMIT", "\"$commit\"") } @@ -94,28 +94,13 @@ android { buildFeatures { buildConfig = true } -} - -tasks.assemble { - dependsOn("copySdk") -} - -// Copies `android.jar` and `core-lambda-stubs.jar` from Android SDK to app's assets. -// Note: The version used is the latest one installed on the machine. -tasks.create("copySdk") { - val assets = File(System.getProperty("user.dir") + "/app/src/main/assets") - val androidJar = assets.resolve("android.jar") + splits { + abi { + isEnable = true - if (androidJar.exists().not()) { - println("Copying SDK android.jar to ${androidJar.absolutePath}") - getAndroidJar().copyTo(androidJar) - } - - val coreLambdaStubs = assets.resolve("core-lambda-stubs.jar") - if (coreLambdaStubs.exists().not()) { - println("Copying SDK core-lambda-stubs.jar to ${coreLambdaStubs.absolutePath}") - getCoreLambdaStubs().copyTo(coreLambdaStubs) + isUniversalApk = true + } } } @@ -193,8 +178,8 @@ dependencies { implementation("io.github.Rosemoe.sora-editor:language-treesitter:$editorVersion") { isTransitive = false } - implementation("com.itsaky.androidide:android-tree-sitter:3.3.0") - implementation("com.itsaky.androidide:tree-sitter-java:3.3.0") + implementation("com.itsaky.androidide:android-tree-sitter:3.4.0") + implementation("com.itsaky.androidide:tree-sitter-java:3.4.0") implementation("io.github.itsaky:nb-javac-android:17.0.0.3") implementation("org.eclipse.jgit:org.eclipse.jgit:5.13.2.202306221912-r") diff --git a/app/src/main/assets/android.jar b/app/src/main/assets/android.jar new file mode 100644 index 000000000..923bafccf Binary files /dev/null and b/app/src/main/assets/android.jar differ diff --git a/app/src/main/assets/core-lambda-stubs.jar b/app/src/main/assets/core-lambda-stubs.jar new file mode 100644 index 000000000..e2a5c6ab8 Binary files /dev/null and b/app/src/main/assets/core-lambda-stubs.jar differ diff --git a/jgit/build.gradle.kts b/jgit/build.gradle.kts index f64331010..d25de3eec 100644 --- a/jgit/build.gradle.kts +++ b/jgit/build.gradle.kts @@ -30,10 +30,10 @@ tasks.withType { dependencies { implementation("org.eclipse.jgit:org.eclipse.jgit:5.13.2.202306221912-r") - implementation("org.eclipse.jgit:org.eclipse.jgit.pgm:6.7.0.202309050840-r") { + implementation("org.eclipse.jgit:org.eclipse.jgit.pgm:6.6.0.202305301015-r") { exclude("net.java.dev.jna", "jna-platform") exclude("net.java.dev.jna", "jna") exclude("commons-logging", "commons-logging") } implementation("com.github.sya-ri:kgit:1.0.5") -} \ No newline at end of file +}