Skip to content

Commit

Permalink
Bump v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Airsaid committed Jun 23, 2022
1 parent 655aa6b commit 704efa9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 76 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
dependencies {
classpath("com.android.tools.build:gradle:${Versions.ANDROID_GRADLE_PLUGIN}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KOTLIN}")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.20.0")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
28 changes: 24 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 modified sample.apk
Binary file not shown.
73 changes: 1 addition & 72 deletions statelayout/build.gradle.kts
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

Expand Down Expand Up @@ -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)
}

0 comments on commit 704efa9

Please sign in to comment.