11apply plugin : ' com.android.library'
2- apply plugin : ' com.novoda.bintray-release'
32
43android {
54 compileSdkVersion compile_sdk_version
@@ -8,7 +7,7 @@ android {
87 minSdkVersion min_sdk_version
98 targetSdkVersion target_sdk_version
109 versionCode 1
11- versionName ' 1.0 '
10+ versionName ' 0.8.9 '
1211 testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
1312 }
1413
@@ -47,11 +46,55 @@ dependencies {
4746 implementation " androidx.recyclerview:recyclerview:$androidx_recyclerview_version "
4847}
4948
50- publish {
51- userOrg = ' evrencoskun' // user name of bintray.com
52- groupId = ' com.evrencoskun.library' // jcenter's url
53- artifactId = ' tableview' // project name
54- publishVersion = ' 0.8.9' // version code
55- desc = ' TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.'
56- website = ' https://github.com/evrencoskun/TableView' // website
49+ // Configure the publishing
50+ apply plugin : ' maven-publish'
51+
52+ task androidJavadocs (type : Javadoc ) {
53+ source = android. sourceSets. main. java. srcDirs
54+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
55+ android. libraryVariants. all { variant ->
56+ if (variant. name == ' release' ) {
57+ owner. classpath + = variant. javaCompileProvider. get(). classpath
58+ }
59+ }
60+ exclude ' **/R.html' , ' **/R.*.html' , ' **/index.html'
61+ }
62+
63+ task androidJavadocsJar (type : Jar , dependsOn : androidJavadocs) {
64+ archiveClassifier. set(' javadoc' )
65+ from androidJavadocs. destinationDir
66+ }
67+
68+ task androidSourcesJar (type : Jar ) {
69+ archiveClassifier. set(' sources' )
70+ from android. sourceSets. main. java. srcDirs
71+ }
72+
73+ afterEvaluate {
74+ publishing {
75+ publications {
76+ release(MavenPublication ) {
77+ from components. release
78+
79+ groupId = ' com.evrencoskun.library'
80+ artifactId = ' tableview'
81+ version = android. defaultConfig. versionName
82+
83+ artifact androidJavadocsJar
84+ artifact androidSourcesJar
85+
86+ pom {
87+ name = ' TableView'
88+ description = ' TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.'
89+ url = ' https://github.com/evrencoskun/TableView'
90+ }
91+ }
92+ }
93+
94+ repositories {
95+ maven {
96+ url = ' https://api.bintray.com/content/evrencoskun/artifact-sandbox/'
97+ }
98+ }
99+ }
57100}
0 commit comments