Fix release build

This commit is contained in:
LoveSy 2023-02-27 11:57:22 +08:00 committed by John Wu
parent d0ec387c28
commit 594c304634
5 changed files with 9 additions and 8 deletions

6
app/.gitignore vendored
View File

@ -7,6 +7,6 @@ app/release
*.hprof
.externalNativeBuild/
*.apk
src/main/assets
src/main/jniLibs
src/main/resources
src/*/assets
src/*/jniLibs
src/*/resources

View File

@ -9,6 +9,10 @@
<uses-permission android:name="android.permission.HIDE_OVERLAY_WINDOWS" />
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"

View File

@ -39,7 +39,6 @@ object ServiceLocator {
NetworkService(
createApiService(retrofit, Const.Url.GITHUB_PAGE_URL),
createApiService(retrofit, Const.Url.GITHUB_RAW_URL),
createApiService(retrofit, Const.Url.GITHUB_API_URL)
)
}
}

View File

@ -8,7 +8,6 @@ import com.topjohnwu.magisk.core.Config.Value.DEBUG_CHANNEL
import com.topjohnwu.magisk.core.Config.Value.DEFAULT_CHANNEL
import com.topjohnwu.magisk.core.Config.Value.STABLE_CHANNEL
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.magisk.core.data.GithubApiServices
import com.topjohnwu.magisk.core.data.GithubPageServices
import com.topjohnwu.magisk.core.data.RawServices
import retrofit2.HttpException
@ -17,8 +16,7 @@ import java.io.IOException
class NetworkService(
private val pages: GithubPageServices,
private val raw: RawServices,
private val api: GithubApiServices
private val raw: RawServices
) {
suspend fun fetchUpdate() = safe {
var info = when (Config.updateChannel) {

View File

@ -220,7 +220,7 @@ fun Project.setupApp() {
dependsOn(stubTask)
inputs.property("version", Config.version)
inputs.property("versionCode", Config.versionCode)
into("src/main/assets")
into("src/${this@all.name}/assets")
from(rootProject.file("scripts")) {
include("util_functions.sh", "boot_patch.sh", "addon.d.sh")
include("uninstaller.sh", "module_installer.sh")