11plugins {
22 id ' com.android.library'
33 id ' maven-publish'
4+ id " com.vanniktech.maven.publish" version " 0.22.0"
45}
56
67ext {
@@ -46,36 +47,47 @@ task androidSourcesJar(type: Jar) {
4647 from android. sourceSets. main. java. srcDirs
4748}
4849
49- project. afterEvaluate {
50- publishing {
51- publications {
52- maven(MavenPublication ) {
53- groupId mGroupId
54- artifactId mArtifactId
55- version mVersionName
50+ group = " info.mxtracks"
51+ version = " ${ getTag()} -SNAPSHOT"
52+ println " Build version $version "
5653
57- from components. release
58-
59- // artifact androidSourcesJar
60- // artifact("$buildDir/outputs/aar/MPChartLib-release.aar")
61-
62- pom {
63- name = mLibraryName
64- description = mLibraryDescription
65- }
54+ mavenPublishing {
55+ pom {
56+ 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"
58+ inceptionYear = " 2022"
59+ url = " https://github.com/AppDevNext/AndroidChart/"
60+ licenses {
61+ license {
62+ name = " The Apache License, Version 2.0"
63+ url = " http://www.apache.org/licenses/LICENSE-2.0.txt"
64+ distribution = " http://www.apache.org/licenses/LICENSE-2.0.txt"
65+ }
66+ }
67+ developers {
68+ developer {
69+ id = " AppDevNext"
70+ name = " AppDevNext"
71+ url = " https://github.com/AppDevNext/"
6672 }
6773 }
74+ scm {
75+ url = " https://github.com/AppDevNext/AndroidChart/"
76+ connection = " scm:git:git://github.com/AppDevNext/AndroidChart.git"
77+ developerConnection = " scm:git:ssh://git@github.com/AppDevNext/AndroidChart.git"
78+ }
79+ }
6880
69- repositories {
70- maven {
71- version = getTag()
72- name = " GitHubPackages "
73- url = " https://maven.pkg.github.com/AppDevNext/AndroidChart "
74- credentials {
75- username = System . getenv( " GITHUBACTOR " )
76- password = System . getenv(" GITHUBTOKEN " )
77- }
81+ // Github packages
82+ repositories {
83+ maven {
84+ version = version
85+ name = " GitHubPackages "
86+ url = " https://maven.pkg.github.com/AppDevNext/AndroidChart "
87+ credentials {
88+ username = System . getenv(" GITHUBACTOR " )
89+ password = System . getenv( " GITHUBTOKEN " )
7890 }
7991 }
8092 }
81- }
93+ }
0 commit comments