mirror of
https://github.com/dzeiocom/charts.git
synced 2025-06-07 00:29:56 +00:00
feat: Make library buildable by jitpack.io
This commit is contained in:
parent
99d4a33abb
commit
8756d17aa6
@ -1,19 +1,55 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
`maven-publish`
|
||||
kotlin("android")
|
||||
}
|
||||
|
||||
val artifact = "charts"
|
||||
group = "com.dzeio"
|
||||
val projectVersion = project.findProperty("version") as String? ?: "0.1.0"
|
||||
version = projectVersion
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register<MavenPublication>("release") {
|
||||
groupId = group as String?
|
||||
artifactId = artifact
|
||||
version = projectVersion
|
||||
|
||||
afterEvaluate {
|
||||
from(components["release"])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "${group}.${artifact}"
|
||||
compileSdk = 33
|
||||
buildToolsVersion = "33.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 21
|
||||
targetSdk = 33
|
||||
aarMetadata {
|
||||
minCompileSdk = 21
|
||||
}
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
testFixtures {
|
||||
enable = true
|
||||
}
|
||||
|
||||
publishing {
|
||||
singleVariant("release") {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
@ -23,12 +59,13 @@ android {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
namespace = "com.dzeio.charts"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user