11buildscript {
2+
23 repositories {
4+
35 google()
4- jcenter()
6+
7+ mavenCentral()
58 }
69
710 dependencies {
8- classpath ' com.android.tools.build:gradle:3.2.1'
9- classpath ' com.github.dcendents:android-maven-gradle-plugin:2.1'
10- classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
11+
12+ classpath ' com.android.tools.build:gradle:7.0.4'
1113 }
1214}
1315
1416allprojects {
17+
1518 repositories {
19+
1620 google()
17- jcenter()
21+
22+ mavenCentral()
1823 }
1924}
2025
2126apply plugin : ' com.android.library'
22- apply plugin : ' com.github.dcendents.android-maven'
23- apply plugin : ' com.jfrog.bintray'
27+ apply plugin : ' maven-publish'
2428
2529ext {
26- libraryName = ' CircularProgressBar'
27- libraryDescription = ' Circular progress bar'
28- libraryVersion = ' 1.2.2'
29- artifact = ' circular-progress-bar'
30- developerId = ' yuriy-budiyev'
31- developerName = ' Yuriy Budiyev'
32- developerEmail = ' yuriy.budiyev@yandex.ru'
30+ libraryVersion = ' 1.2.3'
3331 publishedGroupId = ' com.budiyev.android'
34- siteUrl = ' https://github.com/yuriy-budiyev/circular-progress-bar'
35- gitUrl = ' https://github.com/yuriy-budiyev/circular-progress-bar.git'
36- bintrayRepo = ' maven'
37- bintrayName = ' circular-progress-bar'
38- licenseName = ' MIT License'
39- allLicenses = [' MIT' ]
4032}
4133
34+ group = publishedGroupId
35+ version = libraryVersion
36+
4237android {
43- compileSdkVersion 28
38+ compileSdkVersion 31
39+ buildToolsVersion ' 31.0.0'
4440
4541 defaultConfig {
4642 minSdkVersion 14
47- targetSdkVersion 28
48- versionCode 23
43+ targetSdkVersion 31
44+ versionCode 24
4945 versionName libraryVersion
5046 }
5147
5248 compileOptions {
53- sourceCompatibility JavaVersion . VERSION_1_6
54- targetCompatibility JavaVersion . VERSION_1_6
49+ sourceCompatibility JavaVersion . VERSION_1_7
50+ targetCompatibility JavaVersion . VERSION_1_7
5551 }
5652
5753 buildTypes {
@@ -63,89 +59,40 @@ android {
6359}
6460
6561dependencies {
66- api ' androidx.annotation:annotation:1.0.1'
67- }
68-
69- group = publishedGroupId
70-
71- install {
72- repositories. mavenInstaller {
73- pom {
74- project {
75- packaging ' aar'
76- groupId publishedGroupId
77- artifactId artifact
78- name libraryName
79- description libraryDescription
80- url siteUrl
81-
82- licenses {
83- license {
84- name licenseName
85- }
86- }
87-
88- developers {
89- developer {
90- id developerId
91- name developerName
92- email developerEmail
93- }
94- }
95-
96- scm {
97- connection gitUrl
98- developerConnection gitUrl
99- url siteUrl
100- }
101- }
102- }
103- }
62+ api ' androidx.annotation:annotation:1.3.0'
10463}
10564
106- version = libraryVersion
107-
10865task sourcesJar (type : Jar ) {
109- classifier = ' sources'
66+ archiveClassifier . set( ' sources' )
11067 from android. sourceSets. main. java. srcDirs
11168}
11269
11370task javadoc (type : Javadoc ) {
114- source = android. sourceSets. main. java. srcDirs
71+ options. charSet = ' UTF-8'
72+ failOnError false
73+ source = android. sourceSets. main. java. sourceFiles
11574 classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
116- failOnError = false
11775}
11876
11977task javadocJar (type : Jar , dependsOn : javadoc) {
120- classifier = ' javadoc'
121- from javadoc. getDestinationDir()
78+ archiveClassifier . set( ' javadoc' )
79+ from javadoc. destinationDir
12280}
12381
12482artifacts {
125- archives javadocJar
12683 archives sourcesJar
84+ archives javadocJar
12785}
12886
129- Properties properties = new Properties ()
130- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
131-
132- bintray {
133- user = properties. getProperty(' bintray.user' )
134- key = properties. getProperty(' bintray.apikey' )
135- configurations = [' archives' ]
136-
137- pkg {
138- repo = bintrayRepo
139- name = bintrayName
140- desc = libraryDescription
141- websiteUrl = siteUrl
142- vcsUrl = gitUrl
143- licenses = allLicenses
144- publish = true
145-
146- version {
147- desc = libraryDescription
148- vcsTag = ' v' + libraryVersion
87+ afterEvaluate {
88+ publishing {
89+ publications {
90+ release(MavenPublication ) {
91+ from components. release
92+ artifactId = ' circular-progress-bar'
93+ groupId = publishedGroupId
94+ version = libraryVersion
95+ }
14996 }
15097 }
15198}
0 commit comments