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