Compare commits

..

12 Commits

Author SHA1 Message Date
Pun Butrach
8e9a564e53 build: Migrate major breaking changes from all dependencies (except Placeholder) 2025-09-23 20:11:20 +07:00
Pun Butrach
c9fbc8eb46 ci: Bump dependencies and consistency in Java 2025-09-23 18:44:52 +07:00
Pun Butrach
9b4cea074e build: Bump dependencies 2025-09-23 18:31:11 +07:00
Pun Butrach
c68c493781 revert: ProGuard rules 2025-09-23 17:55:59 +07:00
Pun Butrach
6c4003a21b Merge branch 'compose-dev' into build/optimisation-compose 2025-09-03 17:17:57 +07:00
kitadai31
797777d214 build: Clean up ProGuard rules (#2663) 2025-09-02 22:12:06 +02:00
Pun Butrach
ba9955addb ci: Remove fetch-depth from checkout (#2628) 2025-09-02 13:57:25 +02:00
Pun Butrach
2cdb027e60 build: Bump Gradle Wrapper to 9.0.0 2025-08-03 20:32:33 +07:00
Pun Butrach
079ae38330 chore: multiple commits 2025-08-03 20:26:36 +07:00
Pun Butrach
4b22de012c build: Bump minimum to 3gb of memory (+1gb for meta) 2025-08-03 19:57:11 +07:00
Pun Butrach
66a7f0d60e build: Enable build parallelism 2025-08-03 19:39:18 +07:00
Pun Butrach
5f77d644df build: Bump all dependencies across every ecosystems 2025-08-03 19:20:43 +07:00
16 changed files with 108 additions and 128 deletions

View File

@@ -5,6 +5,7 @@ on:
pull_request: pull_request:
branches: branches:
- dev - dev
- compose-dev
jobs: jobs:
release: release:
@@ -12,12 +13,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Setup Java
uses: actions/setup-java@v5
with: with:
fetch-depth: 0 distribution: 'temurin'
java-version: '17'
- name: Cache Gradle - name: Cache Gradle
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v3
- name: Build - name: Build
env: env:

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Open pull request - name: Open pull request
uses: repo-sync/pull-request@v2 uses: repo-sync/pull-request@v2

View File

@@ -17,18 +17,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Java - name: Setup Java
uses: actions/setup-java@v4 uses: actions/setup-java@v5
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: '17' java-version: '17'
- name: Cache Gradle - name: Cache Gradle
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v3
- name: Build - name: Build
env: env:
@@ -36,7 +34,7 @@ jobs:
run: ./gradlew assembleRelease run: ./gradlew assembleRelease
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v5
with: with:
node-version: "lts/*" node-version: "lts/*"
cache: 'npm' cache: 'npm'
@@ -56,7 +54,7 @@ jobs:
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "app/keystore.jks" echo "${{ secrets.KEYSTORE }}" | base64 --decode > "app/keystore.jks"
- name: Semantic Release - name: Semantic Release
uses: cycjimmy/semantic-release-action@v4 uses: cycjimmy/semantic-release-action@v5
id: semantic id: semantic
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -66,7 +64,7 @@ jobs:
- name: Attest - name: Attest
if: steps.semantic.outputs.new_release_published == 'true' if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/attest-build-provenance@v2 uses: actions/attest-build-provenance@v3
with: with:
subject-name: 'ReVanced Manager ${{ steps.release.outputs.new_release_git_tag }}' subject-name: 'ReVanced Manager ${{ steps.release.outputs.new_release_git_tag }}'
subject-path: app/build/outputs/apk/release/revanced-manager*.apk subject-path: app/build/outputs/apk/release/revanced-manager*.apk

View File

@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.IOException import java.io.IOException
plugins { plugins {
@@ -58,8 +59,7 @@ tasks.matching { it.name.startsWith("publish") }.configureEach {
android { android {
namespace = "app.revanced.manager.plugin.downloader" namespace = "app.revanced.manager.plugin.downloader"
compileSdk = 35 compileSdk = 36
buildToolsVersion = "35.0.1"
defaultConfig { defaultConfig {
minSdk = 26 minSdk = 26
@@ -82,8 +82,10 @@ android {
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
kotlinOptions { kotlin {
jvmTarget = "17" compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
}
} }
buildFeatures { buildFeatures {

View File

@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import kotlin.random.Random import kotlin.random.Random
plugins { plugins {
@@ -52,7 +53,6 @@ dependencies {
// Room // Room
implementation(libs.room.runtime) implementation(libs.room.runtime)
implementation(libs.room.ktx) implementation(libs.room.ktx)
annotationProcessor(libs.room.compiler)
ksp(libs.room.compiler) ksp(libs.room.compiler)
// ReVanced // ReVanced
@@ -60,7 +60,7 @@ dependencies {
implementation(libs.revanced.library) implementation(libs.revanced.library)
// Downloader plugins // Downloader plugins
implementation(project(":api")) implementation(projects.api)
// Native processes // Native processes
implementation(libs.kotlin.process) implementation(libs.kotlin.process)
@@ -111,19 +111,21 @@ dependencies {
android { android {
namespace = "app.revanced.manager" namespace = "app.revanced.manager"
compileSdk = 35 compileSdk = 36
buildToolsVersion = "35.0.1" buildToolsVersion = "36.0.0"
defaultConfig { defaultConfig {
applicationId = "app.revanced.manager" applicationId = "app.revanced.manager"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 36
versionCode = 1 versionCode = 1
versionName = "0.0.1" versionName = "0.0.1"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
} }
buildTypes { buildTypes {
configureEach {
}
debug { debug {
applicationIdSuffix = ".debug" applicationIdSuffix = ".debug"
resValue("string", "app_name", "ReVanced Manager (Debug)") resValue("string", "app_name", "ReVanced Manager (Debug)")
@@ -199,8 +201,11 @@ android {
arg("room.schemaLocation", "$projectDir/schemas") arg("room.schemaLocation", "$projectDir/schemas")
} }
kotlinOptions { kotlin {
jvmTarget = "17" compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
jvmToolchain(17)
}
} }
buildFeatures { buildFeatures {
@@ -223,10 +228,6 @@ android {
} }
} }
kotlin {
jvmToolchain(17)
}
tasks { tasks {
// Needed by gradle-semantic-release-plugin. // Needed by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435. // Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.

View File

@@ -1,63 +1,14 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-dontobfuscate -dontobfuscate
# Required for serialization to work properly -keep class app.revanced.manager.patcher.runtime.process.* { *; }
-if @kotlinx.serialization.Serializable class ** -keep class app.revanced.manager.plugin.** { *; }
-keepclassmembers class <1> { -keep class app.revanced.patcher.** { *; }
static <1>$Companion Companion; -keep class com.android.tools.smali.** { *; }
} -keep class kotlin.** { *; }
-if @kotlinx.serialization.Serializable class ** { -keepnames class com.android.apksig.internal.** { *; }
static **$* *; -keepnames class org.xmlpull.** { *; }
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# This required for the process runtime. -dontwarn com.google.j2objc.annotations.*
-keep class app.revanced.manager.patcher.runtime.process.* {
*;
}
# Required for the patcher to function correctly
-keep class app.revanced.patcher.** {
*;
}
-keep class brut.** {
*;
}
-keep class org.xmlpull.** {
*;
}
-keep class kotlin.** {
*;
}
-keep class org.jf.** {
*;
}
-keep class com.android.** {
*;
}
-keep class app.revanced.manager.plugin.** {
*;
}
-dontwarn com.google.auto.value.**
-dontwarn java.awt.** -dontwarn java.awt.**
-dontwarn javax.** -dontwarn javax.**
-dontwarn org.slf4j.** -dontwarn org.slf4j.**
-dontwarn it.skrape.fetcher.*
-dontwarn com.google.j2objc.annotations.*
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

View File

@@ -16,8 +16,12 @@ import io.ktor.http.isSuccess
import io.ktor.utils.io.ByteReadChannel import io.ktor.utils.io.ByteReadChannel
import io.ktor.utils.io.core.isNotEmpty import io.ktor.utils.io.core.isNotEmpty
import io.ktor.utils.io.core.readBytes import io.ktor.utils.io.core.readBytes
import io.ktor.utils.io.core.remaining
import io.ktor.utils.io.exhausted
import io.ktor.utils.io.readRemaining
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.io.asSink
import kotlinx.serialization.json.Json import kotlinx.serialization.json.Json
import java.io.File import java.io.File
import java.io.OutputStream import java.io.OutputStream
@@ -69,14 +73,14 @@ class HttpService(
) { ) {
http.prepareGet(builder).execute { httpResponse -> http.prepareGet(builder).execute { httpResponse ->
if (httpResponse.status.isSuccess()) { if (httpResponse.status.isSuccess()) {
val stream = outputStream.asSink()
val channel: ByteReadChannel = httpResponse.body() val channel: ByteReadChannel = httpResponse.body()
withContext(Dispatchers.IO) { var count = 0L
while (!channel.isClosedForRead) { stream.use {
val packet = channel.readRemaining(DEFAULT_BUFFER_SIZE.toLong()) while (!channel.exhausted()) {
while (packet.isNotEmpty) { val chunk = channel.readRemaining()
val bytes = packet.readBytes() count += chunk.remaining
outputStream.write(bytes) chunk.transferTo(stream)
}
} }
} }

View File

@@ -2,7 +2,9 @@ package app.revanced.manager.ui.component
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.text.TextLinkStyles
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import com.mikepenz.markdown.compose.Markdown import com.mikepenz.markdown.compose.Markdown
import com.mikepenz.markdown.m3.markdownColor import com.mikepenz.markdown.m3.markdownColor
import com.mikepenz.markdown.m3.markdownTypography import com.mikepenz.markdown.m3.markdownTypography
@@ -18,15 +20,29 @@ fun Markdown(
colors = markdownColor( colors = markdownColor(
text = MaterialTheme.colorScheme.onSurfaceVariant, text = MaterialTheme.colorScheme.onSurfaceVariant,
codeBackground = MaterialTheme.colorScheme.secondaryContainer, codeBackground = MaterialTheme.colorScheme.secondaryContainer,
codeText = MaterialTheme.colorScheme.onSecondaryContainer,
linkText = MaterialTheme.colorScheme.primary
), ),
typography = markdownTypography( typography = markdownTypography(
h1 = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Bold), h1 = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Bold),
h2 = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold), h2 = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight.Bold),
h3 = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.Bold), h3 = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.Bold),
text = MaterialTheme.typography.bodyMedium, text = MaterialTheme.typography.bodyMedium,
list = MaterialTheme.typography.bodyMedium code = markdownTypography().code.copy(color = MaterialTheme.colorScheme.onSecondaryContainer),
list = MaterialTheme.typography.bodyMedium,
textLink = TextLinkStyles(
style = MaterialTheme.typography.bodyMedium.copy(
fontWeight = FontWeight.Bold, textDecoration = TextDecoration.Underline,
color = MaterialTheme.colorScheme.primary
).toSpanStyle(),
hoveredStyle = MaterialTheme.typography.bodyMedium.copy(
fontWeight = FontWeight.Bold, textDecoration = TextDecoration.Underline,
color = MaterialTheme.colorScheme.secondary
).toSpanStyle(),
pressedStyle = MaterialTheme.typography.bodyMedium.copy(
fontWeight = FontWeight.Bold, textDecoration = TextDecoration.Underline,
color = MaterialTheme.colorScheme.tertiary
).toSpanStyle()
),
) )
) )
} }

View File

@@ -87,7 +87,7 @@ class UpdateViewModel(
url(release.downloadUrl) url(release.downloadUrl)
onDownload { bytesSentTotal, contentLength -> onDownload { bytesSentTotal, contentLength ->
downloadedSize = bytesSentTotal downloadedSize = bytesSentTotal
totalSize = contentLength totalSize = contentLength ?: 0
} }
} }
installUpdate() installUpdate()

View File

@@ -42,7 +42,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.datetime.Clock
import kotlinx.datetime.LocalDateTime import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone import kotlinx.datetime.TimeZone
import kotlinx.datetime.format.MonthNames import kotlinx.datetime.format.MonthNames
@@ -53,6 +52,7 @@ import java.util.Locale
import kotlin.properties.PropertyDelegateProvider import kotlin.properties.PropertyDelegateProvider
import kotlin.properties.ReadWriteProperty import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty import kotlin.reflect.KProperty
import kotlin.time.ExperimentalTime
typealias PatchSelection = Map<Int, Set<String>> typealias PatchSelection = Map<Int, Set<String>>
typealias Options = Map<Int, Map<String, Map<String, Any?>>> typealias Options = Map<Int, Map<String, Map<String, Any?>>>
@@ -141,9 +141,10 @@ suspend fun <T> Flow<Iterable<T>>.collectEach(block: suspend (T) -> Unit) {
} }
} }
@OptIn(ExperimentalTime::class)
fun LocalDateTime.relativeTime(context: Context): String { fun LocalDateTime.relativeTime(context: Context): String {
try { try {
val now = Clock.System.now() val now = kotlin.time.Clock.System.now()
val duration = now - this.toInstant(TimeZone.UTC) val duration = now - this.toInstant(TimeZone.UTC)
return when { return when {

View File

@@ -6,11 +6,11 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 org.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the # AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK # Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn # https://developer.android.com/topic/libraries/support-library/androidx-rn

View File

@@ -1,32 +1,32 @@
[versions] [versions]
ktx = "1.16.0" ktx = "1.17.0"
material3 = "1.3.2" material3 = "1.3.2"
ui-tooling = "1.8.1" ui-tooling = "1.9.1"
viewmodel-lifecycle = "2.9.0" viewmodel-lifecycle = "2.9.4"
splash-screen = "1.0.1" splash-screen = "1.0.1"
activity = "1.10.1" activity = "1.11.0"
appcompat = "1.7.0" appcompat = "1.7.1"
preferences-datastore = "1.1.2" preferences-datastore = "1.1.7"
work-runtime = "2.10.1" work-runtime = "2.10.4"
compose-bom = "2025.05.00" compose-bom = "2025.09.00"
navigation = "2.8.6" navigation = "2.9.4"
accompanist = "0.37.0" accompanist = "0.37.3"
placeholder = "1.1.2" placeholder = "2.0.0"
reorderable = "2.4.3" reorderable = "2.5.1"
serialization = "1.8.0" serialization = "1.9.0"
collection = "0.3.8" collection = "0.4.0"
datetime = "0.6.1" datetime = "0.7.1"
room-version = "2.7.1" room-version = "2.8.0"
revanced-patcher = "21.0.0" revanced-patcher = "21.0.0"
revanced-library = "3.0.2" revanced-library = "3.0.2"
koin = "3.5.3" koin = "4.1.1"
ktor = "2.3.9" ktor = "3.3.0"
markdown-renderer = "0.30.0" markdown-renderer = "0.37.0"
fading-edges = "1.0.4" fading-edges = "1.0.4"
kotlin = "2.1.10" kotlin = "2.2.20"
android-gradle-plugin = "8.9.1" android-gradle-plugin = "8.13.0"
dev-tools-gradle-plugin = "2.1.10-1.0.29" dev-tools-gradle-plugin = "2.2.20-2.0.2"
about-libraries-gradle-plugin = "12.1.2" about-libraries-gradle-plugin = "12.2.4"
coil = "2.7.0" coil = "2.7.0"
app-icon-loader-coil = "1.5.0" app-icon-loader-coil = "1.5.0"
libsu = "6.0.0" libsu = "6.0.0"
@@ -34,8 +34,8 @@ scrollbars = "1.0.4"
enumutil = "1.1.1" enumutil = "1.1.1"
compose-icons = "1.2.4" compose-icons = "1.2.4"
kotlin-process = "1.5.1" kotlin-process = "1.5.1"
hidden-api-stub = "4.3.3" hidden-api-stub = "4.4.0"
binary-compatibility-validator = "0.17.0" binary-compatibility-validator = "0.18.1"
[libraries] [libraries]
# AndroidX Core # AndroidX Core

Binary file not shown.

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=61ad310d3c7d3e5da131b76bbf22b5a4c0786e9d892dae8c1658d4b484de3caa distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

2
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -22,5 +22,7 @@ dependencyResolutionManagement {
} }
} }
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
rootProject.name = "revanced-manager" rootProject.name = "revanced-manager"
include(":app", ":api") include(":app", ":api")