-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6e1ac1
commit ef5c864
Showing
46 changed files
with
156 additions
and
182 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
plugins { | ||
alias(libs.plugins.xeonyu.application) | ||
} | ||
|
||
android { | ||
namespace = "com.yzq.bsdiff.demo" | ||
defaultConfig { | ||
applicationId = "com.yzq.bsdiff.demo" | ||
versionCode = 1 | ||
versionName = "0.0.1" | ||
ndk { | ||
abiFilters += listOf("arm64-v8a", "armeabi-v7a") | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
isDebuggable = true | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
dependencies { | ||
implementation(libs.androidx.core.ktx) | ||
implementation(libs.androidx.appcompat) | ||
implementation(libs.google.material) | ||
implementation(libs.androidx.constraintlayout) | ||
implementation(libs.kotlinx.coroutines.android) | ||
implementation(libs.androidx.activity.ktx) | ||
implementation(libs.androidx.lifecycle.livedata.ktx) | ||
implementation(libs.androidx.lifecycle.viewmodel.ktx) | ||
implementation(libs.utilcodex) | ||
|
||
|
||
// 依赖远程库 | ||
// implementation("com.xeonyu:bsdiff:1.0.3-SNAPSHOT") | ||
implementation(libs.xeonyu.bsdiff) | ||
// 依赖本地库 | ||
// implementation(project(":bsdiff")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...c/main/java/com/xeon/demo/MainActivity.kt → .../java/com/yzq/bsdiff/demo/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
plugins { | ||
alias(libs.plugins.xeonyu.library) | ||
alias(libs.plugins.vanniktechPublish) | ||
} | ||
|
||
android { | ||
namespace = "com.yzq.bsdiff" | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
externalNativeBuild { | ||
cmake { | ||
cppFlags("") | ||
} | ||
} | ||
} | ||
externalNativeBuild { | ||
cmake { | ||
path = file("src/main/cpp/CMakeLists.txt") | ||
version = "3.10.2" | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ POM_ARTIFACT_ID=bsdiff | |
POM_PACKAGING=aar | ||
POM_DESCRIPTION=快速实现文件差分功能 | ||
#版本号 | ||
VERSION_NAME=1.0.2 | ||
VERSION_NAME=1.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest> | ||
|
||
</manifest> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.yzq.bsdiff | ||
|
||
/** | ||
* @description: BsDiff工具类 | ||
* @author : yuzhiqiang ([email protected]) | ||
* @date : 2021/11/16 | ||
* @time : 22:12 | ||
*/ | ||
|
||
object BsDiffTool { | ||
|
||
init { | ||
kotlin.runCatching { | ||
System.loadLibrary("xeon_bsdiff") | ||
} | ||
|
||
} | ||
|
||
|
||
/** | ||
* 生成差分包 | ||
* @param newFilePath String 新文件地址 | ||
* @param oldFilePath String 旧文件地址 | ||
* @param patchFilePath String 生成的差分包地址 | ||
* @return Int 0表示成功 | ||
*/ | ||
external fun diff(newFilePath: String, oldFilePath: String, patchFilePath: String): Int | ||
|
||
/** | ||
* 合并差分包 | ||
* @param oldFilePath String 旧文件地址 | ||
* @param patchFilePath String 补丁文件地址 | ||
* @param combineFilePath String 合并后的新文件地址 | ||
* @return Int 0表示成功 | ||
*/ | ||
external fun patch(oldFilePath: String, patchFilePath: String, combineFilePath: String): Int | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) apply false | ||
alias(libs.plugins.android.library) apply false | ||
alias(libs.plugins.kotlin.android) apply false | ||
|
||
alias(libs.plugins.vanniktechPublish) apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Mar 28 16:39:03 CST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenLocal() | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | ||
repositories { | ||
/*发布到本地仓库时测试用*/ | ||
// mavenLocal() | ||
mavenLocal() | ||
/*发布到snapshot仓库时使用*/ | ||
// maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } | ||
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") } | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
versionCatalogs { | ||
create("libs") { | ||
from("com.xeonyu:version-catalog:0.0.5") | ||
} | ||
} | ||
} | ||
|
||
rootProject.name = "XeonBsDiff" | ||
include ':app' | ||
include ':xeon_bsdiff' | ||
include(":app") | ||
include(":bsdiff") |
Oops, something went wrong.