Skip to content

Commit b934482

Browse files
Added configuration to the library/build.gradle file in order to publish the library to Sonatype's Nexus Repository Manager.
1 parent 188cb82 commit b934482

File tree

7 files changed

+51
-26
lines changed

7 files changed

+51
-26
lines changed

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
buildscript {
22
ext.junit5_version = '5.7.1'
3-
ext.kotlin_version = '1.5.10'
3+
ext.kotlin_version = '1.5.20'
44

55
repositories {
66
google()
77
mavenCentral()
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.2.1'
11+
classpath 'com.android.tools.build:gradle:4.2.2'
1212
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -22,5 +22,6 @@ allprojects {
2222
}
2323

2424
wrapper {
25-
gradleVersion = '7.1'
25+
// NOTE: The Gradle wrapper cannot be upgraded to version 7+ until the 'dokka' plugin is upgraded to the latest version
26+
gradleVersion = '6.9'
2627
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ android.useAndroidX=true
55

66
projectGroupName=com.tazkiyatech
77
projectArtifactName=android-utils
8-
projectVersionName=0.1.7
8+
projectVersionName=0.1.8

gradle/wrapper/gradle-wrapper.jar

333 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ case "`uname`" in
7272
Darwin* )
7373
darwin=true
7474
;;
75-
MINGW* )
75+
MSYS* | MINGW* )
7676
msys=true
7777
;;
7878
NONSTOP* )

library/build.gradle

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'maven-publish'
44
apply plugin: 'org.jetbrains.dokka'
5+
apply plugin: 'signing'
56

67
group = getProperty('projectGroupName')
78
version = getProperty('projectVersionName')
@@ -66,9 +67,9 @@ dependencies {
6667
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
6768
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
6869

69-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
70-
androidTestImplementation 'androidx.test:runner:1.3.0'
71-
androidTestImplementation 'androidx.test:rules:1.3.0'
70+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
71+
androidTestImplementation 'androidx.test:runner:1.4.0'
72+
androidTestImplementation 'androidx.test:rules:1.4.0'
7273
}
7374

7475
task generateSourcesJar(type: Jar) {
@@ -103,6 +104,30 @@ afterEvaluate {
103104
groupId getProperty('projectGroupName')
104105
artifactId getProperty('projectArtifactName')
105106
version getProperty('projectVersionName')
107+
108+
pom {
109+
name = getProperty('projectArtifactName')
110+
description = 'An Android library containing a mixture of small helper classes, functions and views useful for Android projects.'
111+
url = 'https://github.com/TazkiyaTech/android-utils'
112+
licenses {
113+
license {
114+
name = 'The Apache License, Version 2.0'
115+
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
116+
}
117+
}
118+
developers {
119+
developer {
120+
id = 'adil-hussain-84'
121+
name = 'Adil Hussain'
122+
email = 'adilson05uk@gmail.com'
123+
}
124+
}
125+
scm {
126+
connection = 'scm:git:git://github.com/TazkiyaTech/android-utils.git'
127+
developerConnection = 'scm:git:ssh://github.com:TazkiyaTech/android-utils.git'
128+
url = 'https://github.com/TazkiyaTech/android-utils/tree/master'
129+
}
130+
}
106131
}
107132
debug(MavenPublication) {
108133
from components.debug
@@ -114,5 +139,20 @@ afterEvaluate {
114139
version getProperty('projectVersionName')
115140
}
116141
}
142+
143+
repositories {
144+
maven {
145+
url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
146+
credentials {
147+
username getProperty('sonatype_username')
148+
password getProperty('sonatype_password')
149+
}
150+
}
151+
}
117152
}
118-
}
153+
154+
signing {
155+
// the 'signing.keyId', 'signing.password' and 'signing.secretKeyRingFile' properties required by this task are defined outside of this project in the '~/.gradle/gradle.properties' file
156+
sign publishing.publications.release
157+
}
158+
}

0 commit comments

Comments
 (0)