Skip to content

Commit

Permalink
Publish to Github Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryolitia committed Oct 26, 2022
1 parent b527b5c commit 3dbcf48
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 67 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# BurstLinker

## Use these packages

Add following codes in `settings.gradle`

```groovy
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://maven.pkg.github.com/Cryolitia/BurstLinker")
credentials {
username = "Cryolitia"
password = "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"
}
}
//other repositories……
}
}
```

use `implementation("com.bilibili:burstlinker:0.0.13")` in `dependencies`

Then, just enjoy it! ^_^

---

[ ![Download](https://api.bintray.com/packages/succlz123/maven/burst-linker/images/download.svg) ](https://bintray.com/succlz123/maven/burst-linker/_latestVersion)

Idea from: [square/gifencoder](https://github.com/square/gifencoder)
Expand Down
3 changes: 2 additions & 1 deletion android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ captures/
*.iml
.externalNativeBuild/
CMakeFiles/
.vs/
.vs/
.cxx/
14 changes: 7 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.novoda:bintray-release:0.9.1'
classpath 'com.android.tools.build:gradle:7.3.1'
//classpath 'com.novoda:bintray-release:0.9.1'
}
}

Expand All @@ -19,8 +19,8 @@ allprojects {
afterEvaluate {
def android = project.extensions.findByName('android') as BaseExtension
android?.compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
tasks.withType(Javadoc) {
Expand All @@ -33,7 +33,7 @@ task clean(type: Delete) {
delete rootProject.buildDir
}

ext {
burstLinkerVer = '0.0.12'
/*ext {
burstLinkerVer = '0.0.13'
libs = ['burstLinkerVer': "com.bilibili:$burstLinkerVer"]
}
}*/
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 07 14:39:55 CST 2018
#Wed Oct 26 22:33:28 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
53 changes: 0 additions & 53 deletions android/lib/build.gradle

This file was deleted.

111 changes: 111 additions & 0 deletions android/lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
plugins {
id("com.android.library")
//id("com.novoda.bintray-release")
id("maven-publish")
signing
}

/*ext {
val VERSION_NAME = rootProject.ext.burstLinkerVer
}*/

android {
compileSdk = 33
//buildToolsVersion '28.0.3'
namespace = "com.bilibili.burstlinker"
defaultConfig {
aarMetadata {
minCompileSdk = 33
}
minSdk = 14
targetSdk = 33
//versionCode = 13
//versionName = "0.0.13"
//testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"

// renderscriptTargetApi 26
// renderscriptSupportModeEnabled true
// renderscriptNdkModeEnabled true

externalNativeBuild {
cmake {
// arguments "-DANDROID_ARM_NEON=TRUE"
// arguments "-DANDROID_ABI=armeabi-v7a with NEON"
arguments("-DANDROID_STL=c++_static")
cppFlags("-std=c++14 -fno-rtti -fno-exceptions")
}
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
create("debug_native") {
isJniDebuggable = true
isRenderscriptDebuggable = true
}
}
externalNativeBuild {
cmake {
path = File("CMakeLists.txt")
}
}
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

dependencies {
//implementation fileTree(dir: "libs", include: ["*.jar"])
//testImplementation("junit:junit:4.12")
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Cryolitia/BurstLinker")
credentials {
username = "Cryolitia"
password = project.findProperty("github.publishPAT").toString()
}
}
}
publications {
register<MavenPublication>("release") {
groupId = "com.bilibili"
artifactId = "burstlinker"
version = "0.0.13"
afterEvaluate {
from(components["release"])
}
pom {
name.set("BurstLinker")
description.set("\uD83D\uDE80 A simple GIF encoder for Android.")
url.set("https://github.com/Cryolitia/BurstLinker")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("succlz123")
name.set("Ning")
}
developer {
id.set("Cryolitia")
name.set("Cryolitia")
email.set("[email protected]")
}
}
}
}
}
}

//apply from: rootProject.file('upload.gradle')
6 changes: 3 additions & 3 deletions android/sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: 'com.android.application'

def libVersion = rootProject.ext.burstLinkerVer
//def libVersion = rootProject.ext.burstLinkerVer

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 33
//buildToolsVersion '28.0.3'

defaultConfig {
applicationId "com.bilibili.burstlinker.sample"
Expand Down

0 comments on commit 3dbcf48

Please sign in to comment.