Skip to content

Commit 2f0e06c

Browse files
committed
xUnwind version upgrade to 2.0.0.
1 parent 78791e9 commit 2f0e06c

45 files changed

Lines changed: 137 additions & 132 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2021 HexHacking Team
3+
Copyright (c) 2020-2023 HexHacking Team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
44
![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
5-
![](https://img.shields.io/badge/release-1.1.1-red.svg?style=flat)
5+
![](https://img.shields.io/badge/release-2.0.0-red.svg?style=flat)
66
![](https://img.shields.io/badge/Android-4.1%20--%2013-blue.svg?style=flat)
77
![](https://img.shields.io/badge/arch-armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)
88

@@ -39,14 +39,6 @@ xUnwind is a collection of Android native stack unwinding solutions.
3939

4040
xUnwind is published on [Maven Central](https://search.maven.org/), and uses [Prefab](https://google.github.io/prefab/) package format for [native dependencies](https://developer.android.com/studio/build/native-dependencies), which is supported by [Android Gradle Plugin 4.0+](https://developer.android.com/studio/releases/gradle-plugin?buildsystem=cmake#native-dependencies).
4141

42-
```Gradle
43-
allprojects {
44-
repositories {
45-
mavenCentral()
46-
}
47-
}
48-
```
49-
5042
```Gradle
5143
android {
5244
buildFeatures {
@@ -55,10 +47,25 @@ android {
5547
}
5648
5749
dependencies {
58-
implementation 'io.hexhacking:xunwind:1.1.1'
50+
implementation 'io.github.hexhacking:xunwind:2.0.0'
5951
}
6052
```
6153

54+
**NOTE**:
55+
56+
1. Starting from version `2.0.0` of xUnwind, group ID changed from `io.hexhacking` to `io.github.hexhacking`.
57+
58+
| version range | group ID | artifact ID | Repository URL |
59+
|:---------------|:-------------------------|:------------| :--------------|
60+
| [1.0.1, 1.1.1] | io.hexhacking | xunwind | [repo](https://repo1.maven.org/maven2/io/hexhacking/xunwind/) |
61+
| [2.0.0, ) | **io.github.hexhacking** | xunwind | [repo](https://repo1.maven.org/maven2/io/github/hexhacking/xunwind/) |
62+
63+
2. xUnwind uses the [prefab package schema v2](https://github.com/google/prefab/releases/tag/v2.0.0), which is configured by default since [Android Gradle Plugin 7.1.0](https://developer.android.com/studio/releases/gradle-plugin?buildsystem=cmake#7-1-0). If you are using Android Gradle Plugin earlier than 7.1.0, please add the following configuration to `gradle.properties`:
64+
65+
```
66+
android.prefabVersion=2.0.0
67+
```
68+
6269
### 2. Add dependency in CMakeLists.txt or Android.mk
6370

6471
If you only use the java interface of xUnwind, please skip this step.
@@ -176,7 +183,7 @@ The remaining three functions are used to convert the absolute-PCs in the `frame
176183
## Java API
177184

178185
```Java
179-
import io.hexhacking.xunwind.XUnwind;
186+
import io.github.hexhacking.xunwind.XUnwind;
180187
```
181188

182189
### 1. Initialize

README.zh-CN.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)
44
![](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
5-
![](https://img.shields.io/badge/release-1.1.1-red.svg?style=flat)
5+
![](https://img.shields.io/badge/release-2.0.0-red.svg?style=flat)
66
![](https://img.shields.io/badge/Android-4.1%20--%2013-blue.svg?style=flat)
77
![](https://img.shields.io/badge/arch-armeabi--v7a%20%7C%20arm64--v8a%20%7C%20x86%20%7C%20x86__64-blue.svg?style=flat)
88

@@ -39,14 +39,6 @@ xUnwind 是一个安卓 native 栈回溯方案的集合。
3939

4040
xUnwind 发布在 [Maven Central](https://search.maven.org/) 上。为了使用 [native 依赖项](https://developer.android.com/studio/build/native-dependencies),xUnwind 使用了从 [Android Gradle Plugin 4.0+](https://developer.android.com/studio/releases/gradle-plugin?buildsystem=cmake#native-dependencies) 开始支持的 [Prefab](https://google.github.io/prefab/) 包格式。
4141

42-
```Gradle
43-
allprojects {
44-
repositories {
45-
mavenCentral()
46-
}
47-
}
48-
```
49-
5042
```Gradle
5143
android {
5244
buildFeatures {
@@ -55,10 +47,25 @@ android {
5547
}
5648
5749
dependencies {
58-
implementation 'io.hexhacking:xunwind:1.1.1'
50+
implementation 'io.github.hexhacking:xunwind:2.0.0'
5951
}
6052
```
6153

54+
**注意**
55+
56+
1. xUnwind 从版本 `2.0.0` 开始,group ID 从 `io.hexhacking` 改为 `io.github.hexhacking`
57+
58+
| 版本号范围 | group ID | artifact ID | 仓库 URL |
59+
|:---------------|:-------------------------|:------------|:----------------------------------------------------------|
60+
| [1.0.1, 1.1.1] | io.hexhacking | xunwind | [repo](https://repo1.maven.org/maven2/io/hexhacking/xunwind/) |
61+
| [2.0.0, ) | **io.github.hexhacking** | xunwind | [repo](https://repo1.maven.org/maven2/io/github/hexhacking/xunwind/) |
62+
63+
2. xUnwind 使用 [prefab package schema v2](https://github.com/google/prefab/releases/tag/v2.0.0),它是从 [Android Gradle Plugin 7.1.0](https://developer.android.com/studio/releases/gradle-plugin?buildsystem=cmake#7-1-0) 开始作为默认配置的。如果你使用的是 Android Gradle Plugin 7.1.0 之前的版本,请在 `gradle.properties` 中加入以下配置:
64+
65+
```
66+
android.prefabVersion=2.0.0
67+
```
68+
6269
### 2. 在 CMakeLists.txt 或 Android.mk 中增加依赖
6370

6471
如果你只使用 xUnwind 的 java 接口,请跳过这一步。
@@ -176,7 +183,7 @@ char *xunwind_frames_get(uintptr_t* frames, size_t frames_sz, const char *prefix
176183
## Java API
177184

178185
```Java
179-
import io.hexhacking.xunwind.XUnwind;
186+
import io.github.hexhacking.xunwind.XUnwind;
180187
```
181188

182189
### 1. 初始化

build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id 'com.android.application' version '7.2.2' apply false
3-
id 'com.android.library' version '7.2.2' apply false
2+
id 'com.android.application' version '7.4.2' apply false
3+
id 'com.android.library' version '7.4.2' apply false
44
}
55

66
task clean(type: Delete) {
@@ -11,17 +11,18 @@ ext {
1111
minSdkVersion = 16
1212
compileSdkVersion = 33
1313
targetSdkVersion = 33
14-
buildToolsVersion = '33.0.0'
14+
buildToolsVersion = '33.0.2'
1515
javaVersion = JavaVersion.VERSION_1_7
1616
ndkVersion = "23.2.8568313"
1717
cmakeVersion = "3.22.1"
1818
abiFilters = "armeabi-v7a,arm64-v8a,x86,x86_64"
1919
useASAN = false
2020
dependencyOnLocalLibrary = true
21+
xunwindVersion = "2.0.0"
2122

22-
POM_GROUP_ID = "io.hexhacking"
23+
POM_GROUP_ID = "io.github.hexhacking"
2324
POM_ARTIFACT_ID = "xunwind"
24-
POM_VERSION_NAME = "1.1.1"
25+
POM_VERSION_NAME = "2.0.0"
2526

2627
POM_NAME = "xUnwind Android Lib"
2728
POM_DESCRIPTION = "xUnwind is a collection of Android native stack unwinding solutions."

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1616
# https://developer.android.com/topic/libraries/support-library/androidx-rn
1717
android.useAndroidX=true
1818
# Automatically convert third-party libraries to use AndroidX
19-
android.enableJetifier=true
19+
android.enableJetifier=true
20+
android.disableAutomaticComponentCreation=true

gradle/publish.gradle

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,14 @@ if (secretPropsFile.exists()) {
2222
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD')
2323
}
2424

25-
task sourcesJar(type: Jar) {
26-
archiveClassifier.set("sources")
27-
from android.sourceSets.main.java.srcDirs
28-
}
29-
30-
task javadoc(type: Javadoc) {
31-
source = android.sourceSets.main.java.sourceFiles
32-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
33-
}
34-
35-
task javadocJar(type: Jar, dependsOn: javadoc) {
36-
archiveClassifier.set("javadoc")
37-
from javadoc.destinationDir
38-
}
39-
4025
project.afterEvaluate {
4126
publishing {
4227
publications {
4328
release(MavenPublication) {
4429
from components.release
4530

46-
artifact sourcesJar
47-
artifact javadocJar
48-
49-
artifactId POM_ARTIFACT_ID
5031
groupId POM_GROUP_ID
32+
artifactId POM_ARTIFACT_ID
5133
version POM_VERSION_NAME
5234

5335
pom {
@@ -84,9 +66,9 @@ project.afterEvaluate {
8466
maven {
8567
name = "sonatype"
8668

87-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
88-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
89-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
69+
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
70+
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
71+
url = POM_VERSION_NAME.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
9072

9173
credentials {
9274
username ossrhUsername
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Aug 29 19:39:58 CST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencyResolutionManagement {
1010
repositories {
1111
google()
1212
mavenCentral()
13+
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
1314
}
1415
}
1516
rootProject.name = "xUnwind"

xunwind/build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
apply plugin: 'com.android.library'
1+
plugins {
2+
id 'com.android.library'
3+
}
24

35
android {
6+
namespace 'io.github.hexhacking.xunwind'
47
compileSdkVersion rootProject.ext.compileSdkVersion
58
buildToolsVersion rootProject.ext.buildToolsVersion
69
ndkVersion rootProject.ext.ndkVersion
@@ -40,6 +43,7 @@ android {
4043
buildFeatures {
4144
prefab true
4245
prefabPublishing true
46+
buildConfig false
4347
}
4448
prefab {
4549
xunwind {
@@ -49,10 +53,16 @@ android {
4953
packagingOptions {
5054
exclude '**/libxdl.so'
5155
}
56+
publishing {
57+
singleVariant('release') {
58+
withSourcesJar()
59+
withJavadocJar()
60+
}
61+
}
5262
}
5363

5464
dependencies {
55-
implementation 'io.hexhacking:xdl:1.1.5'
65+
implementation 'io.github.hexhacking:xdl:2.0.0'
5666
}
5767

5868
apply from: rootProject.file('gradle/check.gradle')

xunwind/consumer-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
-keep class io.hexhacking.xunwind.XUnwind {
1+
-keep class io.github.hexhacking.xunwind.XUnwind {
22
native <methods>;
33
}

0 commit comments

Comments
 (0)