Skip to content

Commit 542294e

Browse files
committed
ADD: Release version 3.0.0 to Maven Central.
1 parent f09107f commit 542294e

File tree

2 files changed

+48
-12
lines changed

2 files changed

+48
-12
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
*.iml
22
.gradle
3-
/local.gradle
4-
/local.buildscript.gradle
53
/local.properties
64
/.idea
7-
/captures
5+
/secring.gpg
86
build
97
library/deploy.gradle
108
.DS_Store

library/build.gradle

+47-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
plugins {
22
id 'com.android.library'
33
id 'maven-publish'
4+
id 'signing'
45
}
56

67
android {
78
namespace 'com.oasisfeng.condom'
89
compileSdk 34
910
defaultConfig {
11+
versionName '3.0.0'
1012
minSdk 14
1113

1214
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -51,29 +53,65 @@ android.libraryVariants.configureEach { variant ->
5153
variant.processJavaResources.dependsOn(taskName)
5254
}
5355

56+
dependencies {
57+
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
58+
compileOnly 'androidx.annotation:annotation:1.7.0'
59+
60+
androidTestImplementation 'androidx.test:runner:1.5.2'
61+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
62+
63+
testImplementation 'junit:junit:4.13.2'
64+
}
65+
5466
publishing {
5567
publications {
5668
maven(MavenPublication) {
5769
groupId = 'com.oasisfeng.condom'
5870
artifactId = 'library'
59-
version = '2.5.0'
71+
version = android.defaultConfig.versionName
6072

6173
afterEvaluate {
6274
from components.release
6375
}
76+
77+
pom {
78+
name = 'Project Condom'
79+
description = 'A thin library to wrap the naked Context in your Android project before passing it to the 3rd-party SDK. It is designed to prevent the 3rd-party SDK from common unwanted behaviors which may harm the user experience of your app.'
80+
url = 'https://github.com/oasisfeng/condom'
81+
licenses {
82+
license {
83+
name = 'The Apache License, Version 2.0'
84+
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
85+
}
86+
}
87+
developers {
88+
developer {
89+
id = 'oasisfeng'
90+
name = 'Oasis Feng'
91+
email = 'oss@oasisfeng.com'
92+
}
93+
}
94+
scm {
95+
connection = 'scm:git:git://github.com/oasisfeng/condom.git'
96+
developerConnection = 'scm:git:ssh://github.com/oasisfeng/condom.git'
97+
url = 'https://github.com/oasisfeng/condom'
98+
}
99+
}
64100
}
65101
}
66102
repositories {
103+
maven {
104+
url = android.defaultConfig.versionName.endsWith("-SNAPSHOT") ? "https://oss.sonatype.org/content/repositories/snapshots/"
105+
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
106+
credentials {
107+
username = ossrhUsername
108+
password = ossrhPassword
109+
}
110+
}
67111
mavenLocal()
68112
}
69113
}
70114

71-
dependencies {
72-
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
73-
compileOnly 'androidx.annotation:annotation:1.7.0'
74-
75-
androidTestImplementation 'androidx.test:runner:1.5.2'
76-
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
77-
78-
testImplementation 'junit:junit:4.13.2'
115+
signing {
116+
sign publishing.publications.maven
79117
}

0 commit comments

Comments
 (0)