Update core to 1.8.6 (#168)

With
- update AGP to 7.4.0
- update Android Build Tools to 33.0.1
This commit is contained in:
Howard Wu 2023-01-28 11:54:06 +08:00 committed by GitHub
parent e62da55614
commit 0964a8eece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 19 deletions

View File

@ -3,6 +3,7 @@ import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.gradle.BaseExtension import com.android.build.gradle.BaseExtension
import org.eclipse.jgit.api.Git import org.eclipse.jgit.api.Git
import org.eclipse.jgit.internal.storage.file.FileRepository import org.eclipse.jgit.internal.storage.file.FileRepository
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
plugins { plugins {
id("com.android.application") apply false id("com.android.application") apply false
@ -26,28 +27,33 @@ val commitCount = run {
Git(repo).log().add(refId).call().count() Git(repo).log().add(refId).call().count()
} }
val coreCommitCount = run { val (coreCommitCount, coreLatestTag) = FileRepositoryBuilder().setGitDir(rootProject.file(".git/modules/core"))
val repo = FileRepository(rootProject.file(".git/modules/core")) .runCatching {
val refId = repo.refDatabase.exactRef("HEAD").objectId!! build().use { repo ->
Git(repo).log().add(refId).call().count() val git = Git(repo)
val coreCommitCount =
git.log()
.add(repo.refDatabase.exactRef("refs/remotes/origin/master").objectId)
.call().count() + 4200
val ver = git.describe()
.setTags(true)
.setAbbrev(0).call().removePrefix("v")
coreCommitCount to ver
} }
}.getOrNull() ?: (1 to "1.0")
// sync from https://github.com/LSPosed/LSPosed/blob/master/build.gradle.kts // sync from https://github.com/LSPosed/LSPosed/blob/master/build.gradle.kts
val defaultManagerPackageName by extra("org.lsposed.lspatch") val defaultManagerPackageName by extra("org.lsposed.lspatch")
val apiCode by extra(93) val apiCode by extra(93)
val verCode by extra(commitCount) val verCode by extra(commitCount)
val verName by extra("0.5.1") val verName by extra("0.5.1")
val coreVerCode by extra(coreCommitCount + 4200) val coreVerCode by extra(coreCommitCount)
val coreVerName by extra( val coreVerName by extra(coreLatestTag)
file("$rootDir/core/build.gradle.kts").readLines()
.find { it.startsWith("val verName by extra") }!!
.split('"')[1]
)
val androidMinSdkVersion by extra(28) val androidMinSdkVersion by extra(28)
val androidTargetSdkVersion by extra(33) val androidTargetSdkVersion by extra(33)
val androidCompileSdkVersion by extra(33) val androidCompileSdkVersion by extra(33)
val androidCompileNdkVersion by extra("25.1.8937393") val androidCompileNdkVersion by extra("25.1.8937393")
val androidBuildToolsVersion by extra("32.0.0") val androidBuildToolsVersion by extra("33.0.1")
val androidSourceCompatibility by extra(JavaVersion.VERSION_11) val androidSourceCompatibility by extra(JavaVersion.VERSION_11)
val androidTargetCompatibility by extra(JavaVersion.VERSION_11) val androidTargetCompatibility by extra(JavaVersion.VERSION_11)

2
core

@ -1 +1 @@
Subproject commit 8f3684a9cb1874f961ec7729ffd2f81d62fb16c7 Subproject commit 5666dca1e3b83e9b664bfcd096370b1a7da6eff1

View File

@ -5,4 +5,4 @@ android.nonTransitiveRClass=true
android.enableR8.fullMode=true android.enableR8.fullMode=true
android.useAndroidX=true android.useAndroidX=true
agpVersion=7.3.1 agpVersion=7.4.0

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -46,6 +46,7 @@ android {
} }
sourceSets["main"].assets.srcDirs(rootProject.projectDir.resolve("out/assets")) sourceSets["main"].assets.srcDirs(rootProject.projectDir.resolve("out/assets"))
namespace = "org.lsposed.lspatch"
applicationVariants.all { applicationVariants.all {
kotlin.sourceSets { kotlin.sourceSets {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools">
package="org.lsposed.lspatch">
<uses-permission <uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES" android:name="android.permission.QUERY_ALL_PACKAGES"

View File

@ -14,6 +14,7 @@ android {
proguardFiles("proguard-rules.pro") proguardFiles("proguard-rules.pro")
} }
} }
namespace = "org.lsposed.lspatch.metaloader"
} }
androidComponents.onVariants { variant -> androidComponents.onVariants { variant ->

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="org.lsposed.lspatch.metaloader" /> <manifest />

View File

@ -19,6 +19,7 @@ android {
path("src/main/jni/CMakeLists.txt") path("src/main/jni/CMakeLists.txt")
} }
} }
namespace = "org.lsposed.lspatch.loader"
} }
androidComponents.onVariants { variant -> androidComponents.onVariants { variant ->

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest package="org.lsposed.lspatch.loader" /> <manifest />