Skip to content

Commit 62ffed8

Browse files
committed
upload library to maven
1 parent 33bfa0f commit 62ffed8

File tree

7 files changed

+71
-1
lines changed

7 files changed

+71
-1
lines changed

debug-db-encrypt/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply from: '../maven.gradle'
23

34
android {
45
compileSdk rootProject.ext.compileSdk

debug-db-encrypt/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ARTIFACT_ID=debug-db-enncrypt

debug-db/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.library'
2+
apply from: '../maven.gradle'
23

34
android {
45
compileSdk rootProject.ext.compileSdk

debug-db/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ARTIFACT_ID=debug-db

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ org.gradle.jvmargs=-Xmx1536m
3535
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
3636
# org.gradle.parallel=true
3737
android.useAndroidX=true
38-
android.enableJetifier=true
38+
android.enableJetifier=true
39+
signing.keyId=xxxxxx
40+
signing.password=xxxxxx
41+
signing.secretKeyRingFile=xxxxxx.gpg

maven.gradle

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
apply plugin: 'maven-publish'
2+
apply plugin: 'signing'
3+
4+
task generateSourcesJar(type: Jar) {
5+
from android.sourceSets.main.java.srcDirs
6+
classifier 'sources'
7+
}
8+
Properties localProperties = new Properties()
9+
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
10+
11+
afterEvaluate {
12+
publishing {
13+
publications {
14+
maven(MavenPublication) {
15+
from components.release
16+
groupId "com.amitshekhar.android"
17+
artifactId project.ARTIFACT_ID
18+
version '1.0.6'
19+
artifact generateSourcesJar
20+
pom {
21+
name = 'Android-Debug-Database'
22+
description = 'A library for debugging android databases and shared preferences - Make Debugging Great Again'
23+
url = 'https://github.com/amitshekhariitbhu/Android-Debug-Database'
24+
licenses {
25+
license {
26+
name = 'The Apache License, Version 2.0'
27+
url = 'https://github.com/amitshekhariitbhu/Android-Debug-Database/raw/master/LICENSE'
28+
}
29+
}
30+
developers {
31+
developer {
32+
id = 'amitshekhar'
33+
name = 'amitshekhar'
34+
email = 'amit.shekhar.iitbhu@gmail.com'
35+
}
36+
}
37+
scm {
38+
connection = 'https://github.com/amitshekhariitbhu/Android-Debug-Databasee.git'
39+
developerConnection = 'https://github.com/amitshekhariitbhu/Android-Debug-Database.git'
40+
url = 'https://github.com/amitshekhariitbhu/Android-Debug-Database'
41+
}
42+
}
43+
}
44+
}
45+
repositories {
46+
maven {
47+
url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
48+
credentials {
49+
username localProperties.getProperty('sonatype.name')
50+
password localProperties.getProperty('sonatype.password')
51+
}
52+
}
53+
}
54+
}
55+
}
56+
signing {
57+
sign publishing.publications
58+
}

maven_publish.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#upload to mavenCentral()
2+
#https://s01.oss.sonatype.org/#stagingRepositories
3+
./gradlew :debug-db:publishMavenPublicationToMavenRepository
4+
5+
./gradlew :debug-db-encrypt:publishMavenPublicationToMavenRepository

0 commit comments

Comments
 (0)