Skip to content

Commit

Permalink
chore: Merge branch dev into master (#1145)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 authored Oct 7, 2023
2 parents 0878797 + 8d84a3b commit e0c5f63
Show file tree
Hide file tree
Showing 1,286 changed files with 32,010 additions and 24,414 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ I acknowledge that:
- I have updated:
- To the latest version of the app (stable is v0.12.3.10)
- All extensions
- I have tried the troubleshooting guide: https://aniyomi.org/help/guides/troubleshooting-problems/
- I have gone through the FAQ (https://aniyomi.org/help/faq/) and troubleshooting guide (https://aniyomi.org/help/guides/troubleshooting/)
- If this is an issue with an anime extension, that I should be opening an issue in https://github.com/aniyomiorg/aniyomi-extensions
- I have searched the existing issues and this is new ticket **NOT** a duplicate or related to another open or closed issue
- I will fill out the title and the information in this template
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/report_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ body:
required: true
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/aniyomiorg/aniyomi-extensions/issues/new/choose).
required: true
- label: I have tried the [troubleshooting guide](https://aniyomi.org/help/guides/troubleshooting/).
- label: I have gone through the [FAQ](https://aniyomi.org/help/faq/) and [troubleshooting guide](https://aniyomi.org/help/guides/troubleshooting/).
required: true
- label: I have updated the app to version **[0.12.3.10](https://github.com/aniyomiorg/aniyomi/releases/latest)**.
required: true
Expand Down
3 changes: 1 addition & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"ignoreDeps": [
"androidx.core:core-splashscreen",
"com.android.tools:r8",
"com.google.guava:guava",
"com.github.commandiron:WheelPickerCompose"
"com.google.guava:guava"
]
}
6 changes: 3 additions & 3 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
- name: Dependency Review
uses: actions/dependency-review-action@v3

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- name: Build app and run unit tests
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease testStandardReleaseUnitTest
arguments: lintKotlin assembleStandardRelease testStandardReleaseUnitTest
18 changes: 14 additions & 4 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
- aniyomi-mpv
- dev
tags:
- v*

Expand All @@ -23,16 +23,26 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt

- name: Set ACRA properties
env:
acraUri: ${{ secrets.ACRA_URI }}
acraLogin: ${{ secrets.ACRA_LOGIN }}
acraPassword: ${{ secrets.ACRA_PASSWORD }}
run: |
echo "ACRA_URI=$acraUri" >> acra.properties
echo "ACRA_LOGIN=$acraLogin" >> acra.properties
echo "ACRA_PASSWORD=$acraPassword" >> acra.properties
- name: Build app and run unit tests
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease testStandardReleaseUnitTest
arguments: lintKotlin assembleStandardRelease testStandardReleaseUnitTest

# Sign APK and create release for tags

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/issue_moderator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v1
uses: tachiyomiorg/issue-moderator-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
duplicate-label: Duplicate

auto-close-rules: |
[
{
Expand All @@ -27,3 +29,4 @@ jobs:
"message": "Requested information in the template was not filled out."
}
]
auto-close-ignore-label: do-not-autoclose
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
/local.properties
/acra.properties
/.idea/workspace.xml
.DS_Store
.idea/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Build | Preview Release | Codefactor | Stable | Translate Aniyomi | Discord Server |
|-------|-----------|-------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| ![CI](https://github.com/aniyomiorg/aniyomi/workflows/CI/badge.svg?branch=master&event=push) | [![latest preview build](https://img.shields.io/github/v/release/aniyomiorg/aniyomi-preview.svg?maxAge=3600&label=download)](https://github.com/aniyomiorg/aniyomi-preview/releases) | [![CodeFactor](https://www.codefactor.io/repository/github/aniyomiorg/aniyomi/badge)](https://www.codefactor.io/repository/github/aniyomiorg/aniyomi) | [![stable release](https://img.shields.io/github/release/aniyomiorg/aniyomi.svg?maxAge=3600&label=download)](https://github.com/aniyomiorg/aniyomi/releases) | [![Translation status](https://hosted.weblate.org/widgets/aniyomi/-/svg-badge.svg)](https://hosted.weblate.org/engage/aniyomi/?utm_source=widget) | [![Discord](https://img.shields.io/discord/841701076242530374?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/F32UjdJZrR) |
| [![CI](https://github.com/aniyomiorg/aniyomi/actions/workflows/build_push.yml/badge.svg)] (https://github.com/aniyomiorg/aniyomi/actions/workflows/build_push.yml) | [![latest preview build](https://img.shields.io/github/v/release/aniyomiorg/aniyomi-preview.svg?maxAge=3600&label=download)](https://github.com/aniyomiorg/aniyomi-preview/releases) | [![CodeFactor](https://www.codefactor.io/repository/github/aniyomiorg/aniyomi/badge)](https://www.codefactor.io/repository/github/aniyomiorg/aniyomi) | [![stable release](https://img.shields.io/github/release/aniyomiorg/aniyomi.svg?maxAge=3600&label=download)](https://github.com/aniyomiorg/aniyomi/releases) | [![Translation status](https://hosted.weblate.org/widgets/aniyomi/-/svg-badge.svg)](https://hosted.weblate.org/engage/aniyomi/?utm_source=widget) | [![Discord](https://img.shields.io/discord/841701076242530374?label=discord&labelColor=7289da&color=2c2f33&style=flat)](https://discord.gg/F32UjdJZrR) |


# ![app icon](.github/readme-images/app-icon.png)Aniyomi
Expand Down
116 changes: 36 additions & 80 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jmailen.gradle.kotlinter.tasks.LintTask
import java.io.FileInputStream
import java.util.Properties

plugins {
id("com.android.application")
id("com.mikepenz.aboutlibraries.plugin")
kotlin("android")
kotlin("plugin.serialization")
id("com.github.zellius.shortcut-helper")
id("com.squareup.sqldelight")
}

if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
apply<com.google.gms.googleservices.GoogleServicesPlugin>()
apply<com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin>()
}

shortcutHelper.setFilePath("./shortcuts.xml")
Expand All @@ -22,24 +17,30 @@ val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")

android {
namespace = "eu.kanade.tachiyomi"
compileSdk = AndroidConfig.compileSdk
ndkVersion = AndroidConfig.ndk

defaultConfig {
applicationId = "xyz.jmir.tachiyomi.mi"
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
versionCode = 94
versionName = "0.14.3"

versionCode = 103
versionName = "0.14.6"

buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
buildConfigField("boolean", "INCLUDE_UPDATER", "false")
buildConfigField("boolean", "PREVIEW", "false")

// Please disable ACRA or use your own instance in forked versions of the project
//buildConfigField("String", "ACRA_URI", "\"https://acra.jmir.xyz/report\"")
// Put these fields in acra.properties
val acraProperties = Properties()
rootProject.file("acra.properties")
.takeIf { it.exists() }
?.let { acraProperties.load(FileInputStream(it)) }
val acraUri = acraProperties.getProperty("ACRA_URI", "")
val acraLogin = acraProperties.getProperty("ACRA_LOGIN", "")
val acraPassword = acraProperties.getProperty("ACRA_PASSWORD", "")
buildConfigField("String", "ACRA_URI", "\"$acraUri\"")
buildConfigField("String", "ACRA_LOGIN", "\"$acraLogin\"")
buildConfigField("String", "ACRA_PASSWORD", "\"$acraPassword\"")

ndk {
abiFilters += SUPPORTED_ABIS
Expand Down Expand Up @@ -108,7 +109,7 @@ android {
}
}

packagingOptions {
packaging {
resources.excludes.addAll(listOf(
"META-INF/DEPENDENCIES",
"LICENSE.txt",
Expand Down Expand Up @@ -142,38 +143,18 @@ android {
composeOptions {
kotlinCompilerExtensionVersion = compose.versions.compiler.get()
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

isCoreLibraryDesugaringEnabled = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

sqldelight {
database("Database") {
packageName = "eu.kanade.tachiyomi"
dialect = "sqlite:3.24"
sourceFolders = listOf("sqldelight")
}
database("AnimeDatabase") {
packageName = "eu.kanade.tachiyomi.mi"
dialect = "sqlite:3.24"
sourceFolders = listOf("sqldelightanime")
}
}
}

dependencies {
implementation(project(":i18n"))
implementation(project(":core"))
implementation(project(":core-metadata"))
implementation(project(":source-api"))

coreLibraryDesugaring(libs.desugar)
implementation(project(":source-local"))
implementation(project(":data"))
implementation(project(":domain"))
implementation(project(":presentation-core"))
implementation(project(":presentation-widget"))

// Compose
implementation(platform(compose.bom))
Expand All @@ -187,7 +168,6 @@ dependencies {
implementation(compose.ui.tooling)
implementation(compose.ui.util)
implementation(compose.accompanist.webview)
implementation(compose.accompanist.flowlayout)
implementation(compose.accompanist.permissions)
implementation(compose.accompanist.themeadapter)
implementation(compose.accompanist.systemuicontroller)
Expand All @@ -196,9 +176,6 @@ dependencies {
implementation(androidx.paging.compose)

implementation(libs.bundles.sqlite)
implementation(libs.sqldelight.android.driver)
implementation(libs.sqldelight.coroutines)
implementation(libs.sqldelight.android.paging)

implementation(kotlinx.reflect)

Expand All @@ -215,26 +192,24 @@ dependencies {
implementation(androidx.splashscreen)
implementation(androidx.recyclerview)
implementation(androidx.viewpager)
implementation(androidx.glance)
implementation(androidx.profileinstaller)
implementation(androidx.mediasession)

implementation(androidx.bundles.lifecycle)

// Job scheduling
implementation(androidx.bundles.workmanager)

// RX
// RxJava
implementation(libs.bundles.reactivex)
implementation(libs.flowreactivenetwork)

// Network client
// Networking
implementation(libs.bundles.okhttp)
implementation(libs.okio)
implementation(libs.conscrypt.android) // TLS 1.3 support for Android < 10

// TLS 1.3 support for Android < 10
implementation(libs.conscrypt.android)

// Data serialization (JSON, protobuf)
// Data serialization (JSON, protobuf, xml)
implementation(kotlinx.bundles.serialization)

// HTML parser
Expand All @@ -258,9 +233,6 @@ dependencies {
}
implementation(libs.image.decoder)

// Sort
implementation(libs.natural.comparator)

// UI libraries
implementation(libs.material)
implementation(libs.flexible.adapter.core)
Expand All @@ -272,29 +244,22 @@ dependencies {
implementation(libs.insetter)
implementation(libs.bundles.richtext)
implementation(libs.aboutLibraries.compose)
implementation(libs.cascade)
implementation(libs.bundles.voyager)
implementation(libs.wheelpicker)
implementation(libs.materialmotion.core)
implementation(libs.compose.cascade)
implementation(libs.compose.materialmotion)
implementation(libs.compose.simpleicons)

// Logging
implementation(libs.logcat)

// Crash reports/analytics
// Crash reports
implementation(libs.acra.http)
implementation(libs.firebase.analytics)
implementation(libs.firebase.crashlytics)

// Add the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation("com.google.firebase:firebase-analytics-ktx")

// Shizuku
implementation(libs.bundles.shizuku)

// Tests
testImplementation(libs.junit)
testImplementation(libs.bundles.test)

// For detecting memory leaks; see https://square.github.io/leakcanary/
// debugImplementation(libs.leakcanary.android)
Expand All @@ -306,6 +271,8 @@ dependencies {
// FFmpeg-kit
implementation(libs.ffmpeg.kit)
implementation(libs.arthenica.smartexceptions)
// seeker seek bar
implementation(libs.seeker)
}

androidComponents {
Expand All @@ -323,20 +290,14 @@ androidComponents {
}

tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}

withType<LintTask>().configureEach {
exclude { it.file.path.contains("generated[\\\\/]".toRegex()) }
}

// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xcontext-receivers",
"-opt-in=coil.annotation.ExperimentalCoilApi",
"-opt-in=com.google.accompanist.permissions.ExperimentalPermissionsApi",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
Expand Down Expand Up @@ -366,11 +327,6 @@ tasks {
)
}
}

preBuild {
val ktlintTask = if (System.getenv("GITHUB_BASE_REF") == null) formatKotlin else lintKotlin
dependsOn(ktlintTask)
}
}

buildscript {
Expand Down
1 change: 1 addition & 0 deletions app/proguard-android-optimize.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-dontusemixedcaseclassnames
-ignorewarnings
-verbose

-keepattributes *Annotation*
Expand Down
5 changes: 4 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
-dontobfuscate

-keep,allowoptimization class eu.kanade.**
-keep,allowoptimization class tachiyomi.**

# Keep common dependencies used in extensions
-keep,allowoptimization class androidx.preference.** { public protected *; }
-keep,allowoptimization class android.content.** { *; }
Expand Down Expand Up @@ -71,4 +74,4 @@
##---------------End: proguard configuration for kotlinx.serialization ----------

# XmlUtil
-keep public enum nl.adaptivity.xmlutil.EventType { *; }
-keep public enum nl.adaptivity.xmlutil.EventType { *; }
Loading

0 comments on commit e0c5f63

Please sign in to comment.