1+ import info.git.versionHelper.getVersionText
2+ import java.net.URI
3+
14plugins {
2- id " com.android.library"
3- id " maven-publish"
4- id " kotlin-android"
5- id " com.vanniktech.maven.publish" version " 0.34.0"
5+ id( " com.android.library" )
6+ id( " maven-publish" )
7+ id( " kotlin-android" )
8+ id( " com.vanniktech.maven.publish" ) version " 0.34.0"
69}
710
811android {
9- namespace " com.github.mikephil.charting"
12+ namespace = " com.github.mikephil.charting"
1013 defaultConfig {
11- minSdkVersion 21
12- compileSdk 35
13- targetSdkVersion 35
14+ minSdk = 21
15+ compileSdk = 35
1416
1517 // VERSION_NAME no longer available as of 4.1
1618 // https://issuetracker.google.com/issues/158695880
17- buildConfigField " String" , " VERSION_NAME" , " \" ${ getTag ()} \" "
19+ buildConfigField( " String" , " VERSION_NAME" , " \" ${getVersionText ()} \" " )
1820
19- consumerProguardFiles " proguard-lib.pro"
21+ consumerProguardFiles.add( File ( " proguard-lib.pro" ))
2022 }
2123 compileOptions {
22- sourceCompatibility JavaVersion . VERSION_17
23- targetCompatibility JavaVersion . VERSION_17
24+ sourceCompatibility = JavaVersion .VERSION_17
25+ targetCompatibility = JavaVersion .VERSION_17
2426 }
2527 buildTypes {
2628 release {
27- minifyEnabled false
29+ isMinifyEnabled = false
2830 }
2931 }
3032 buildFeatures {
3133 buildConfig = true
3234 }
3335 testOptions {
34- unitTests. returnDefaultValues = true // this prevents "not mocked" error
36+ unitTests.isReturnDefaultValues = true // this prevents "not mocked" error
3537 }
3638}
3739
3840dependencies {
39- implementation " androidx.annotation:annotation:1.9.1"
40- implementation " androidx.core:core:1.16.0"
41- implementation " androidx.activity:activity-ktx:1.10.1"
42- testImplementation " junit:junit:4.13.2"
41+ implementation( " androidx.annotation:annotation:1.9.1" )
42+ implementation( " androidx.core:core:1.16.0" )
43+ implementation( " androidx.activity:activity-ktx:1.10.1" )
44+ testImplementation( " junit:junit:4.13.2" )
4345}
4446
45- tasks. register(" androidSourcesJar" , Jar ) {
47+ tasks.register< Jar > (" androidSourcesJar" ) {
4648 archiveClassifier.set(" sources" )
47- from android. sourceSets. main. java. srcDirs
49+ from( android.sourceSets[ " main" ] .java.srcDirs)
4850}
4951
5052group = " info.mxtracks"
51- version = " ${ getTag() } "
52- println " Build version $v ersion "
53+ var versionVersion = getVersionText()
54+ println ( " Build version $versionVersion " )
5355
5456mavenPublishing {
5557 pom {
5658 name = " Android Chart"
57- description = " A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations"
59+ description =
60+ " A powerful Android chart view/graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations"
5861 inceptionYear = " 2022"
5962 url = " https://github.com/AppDevNext/AndroidChart/"
6063 licenses {
@@ -81,9 +84,9 @@ mavenPublishing {
8184 // Github packages
8285 repositories {
8386 maven {
84- version = version + " -SNAPSHOT"
87+ version = " $versionVersion -SNAPSHOT"
8588 name = " GitHubPackages"
86- url = " https://maven.pkg.github.com/AppDevNext/AndroidChart"
89+ url = URI ( " https://maven.pkg.github.com/AppDevNext/AndroidChart" )
8790 credentials {
8891 username = System .getenv(" GITHUBACTOR" )
8992 password = System .getenv(" GITHUBTOKEN" )
0 commit comments