Skip to content

Commit

Permalink
feat: add maven center.
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonli committed Sep 26, 2024
1 parent eec147d commit 78506d3
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion lib_thread_shield/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
`maven-publish`
}

android {
Expand All @@ -13,7 +14,6 @@ android {

defaultConfig {
minSdk = 21

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
externalNativeBuild {
Expand Down Expand Up @@ -57,4 +57,32 @@ android {

dependencies {
implementation(libs.shadowhook)
}

publishing {
publications {
create<MavenPublication>("release") {
groupId = "com.github.HuolalaTech"
artifactId = "hll-sys-hook-android"
version = "1.4-SNAPSHOT"

afterEvaluate {
val pubComponent = components.findByName("release")
if (pubComponent != null) {
from(pubComponent)
}
}
}
}

repositories {
maven {
name = "jitpack"
url = uri("https://jitpack.io")
}
}
}

tasks.named("publishToMavenLocal") {
dependsOn("assembleRelease")
}

0 comments on commit 78506d3

Please sign in to comment.