-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
26 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,27 @@ android.useAndroidX=true | |
android.enableJetifier=true | ||
# Kotlin code style for this project: "official" or "obsolete": | ||
kotlin.code.style=official | ||
# Pom | ||
pom.id=airsaid | ||
pom.name=Airsaid | ||
pom.email=[email protected] | ||
# Maven publish params | ||
SONATYPE_HOST=S01 | ||
RELEASE_SIGNING_ENABLED=true | ||
|
||
GROUP=com.airsaid | ||
POM_ARTIFACT_ID=statelayout | ||
VERSION_NAME=1.1.0 | ||
|
||
POM_NAME=StateLayout | ||
POM_DESCRIPTION=A customize multiple state layout for Android. | ||
POM_INCEPTION_YEAR=2021 | ||
POM_URL=https://github.com/Airsaid/StateLayout | ||
|
||
POM_LICENSE_NAME=The Apache Software License, Version 2.0 | ||
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt | ||
POM_LICENSE_DIST=repo | ||
|
||
POM_SCM_URL=https://github.com/Airsaid/StateLayout/ | ||
POM_SCM_CONNECTION=scm:git:git://github.com/Airsaid/StateLayout.git | ||
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/Airsaid/StateLayout.git | ||
|
||
POM_DEVELOPER_ID=Airsaid | ||
POM_DEVELOPER_NAME=YooZhou | ||
POM_DEVELOPER_URL=https://github.com/Airsaid/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
plugins { | ||
id("com.android.library") | ||
id("maven-publish") | ||
id("signing") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
val publishId = "multistatelayout" | ||
val publishVersion = "1.0.1" | ||
val isReleaseBuild = !publishVersion.endsWith("-SNAPSHOT") | ||
|
||
android { | ||
compileSdk = Versions.App.COMPILE_SDK | ||
|
||
|
@@ -36,70 +31,4 @@ dependencies { | |
androidTestImplementation(Libs.Test.ANDROIDX_JUNIT) | ||
androidTestImplementation(Libs.Test.ESPRESSO) | ||
implementation(Libs.AndroidX.ANNOTATION) | ||
} | ||
|
||
val sourcesJar by tasks.creating(Jar::class) { | ||
group = JavaBasePlugin.DOCUMENTATION_GROUP | ||
description = "Assembles sources JAR" | ||
archiveClassifier.set("sources") | ||
from(android.sourceSets.getByName("main").java.srcDirs) | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
create<MavenPublication>("release") { | ||
group = "com.airsaid" | ||
artifactId = publishId | ||
version = publishVersion | ||
|
||
from(components.getByName("release")) | ||
|
||
artifact(sourcesJar) | ||
|
||
pom { | ||
name.set(publishId) | ||
description.set("A customize multiple state layout for Android.") | ||
url.set("https://github.com/Airsaid/MultiStateLayout") | ||
|
||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set(property("pom.id") as String) | ||
name.set(property("pom.name") as String) | ||
email.set(property("pom.email") as String) | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:git://github.com/Airsaid/MultiStateLayout.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/Airsaid/MultiStateLayout.git") | ||
url.set("https://github.com/Airsaid/MultiStateLayout") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
setUrl(if (isReleaseBuild) "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
else "https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
|
||
credentials { | ||
username = if (hasProperty("ossrhUsername")) properties["ossrhUsername"] as String else "" | ||
password = if (hasProperty("ossrhPassword")) properties["ossrhPassword"] as String else "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign(publishing.publications) | ||
} |