Created
March 2, 2021 08:39
-
-
Save plateaukao/3c4cf4ca18d2e5a81dd7642ac602d0a7 to your computer and use it in GitHub Desktop.
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
apply plugin: 'com.android.library' | |
... | |
apply plugin: 'maven-publish' | |
apply plugin: 'signing' | |
group = "com.linecorp.linesdk" | |
version = "5.6.1" | |
android { | |
... | |
} | |
task sourcesJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
classifier = 'sources' | |
} | |
task javadocJar(type: Jar, dependsOn: javadoc) { | |
classifier = 'javadoc' | |
from javadoc.destinationDir | |
} | |
afterEvaluate { | |
publishing { | |
publications { | |
release(MavenPublication) { | |
groupId group | |
artifactId 'linesdk' | |
version version | |
from(components["release"]) | |
artifact sourcesJar | |
artifact javadocJar | |
pom { | |
name = 'linesdk' | |
description = 'The LINE SDK for Android provides a modern way of implementing LINE APIs.' | |
url = 'https://github.com/line/line-sdk-android' | |
licenses { | |
license { | |
name = 'The Apache License, Version 2.0' | |
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | |
} | |
} | |
developers { | |
developer { | |
name = 'LINE Corporation' | |
email = '[email protected]' | |
url = 'https://engineering.linecorp.com/en/' | |
} | |
} | |
scm { | |
connection = 'scm:[email protected]:line/line-sdk-android.git' | |
developerConnection = 'scm:git:ssh://github.com:line/line-sdk-android.git' | |
url = 'https://github.com/line/line-sdk-android' | |
} | |
} | |
} | |
} | |
repositories { | |
maven { | |
name = "sonatype" | |
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | |
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | |
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | |
def name = findProperty('repositoryUsername') ?: '' | |
def pw = findProperty('repositoryPassword') ?: '' | |
credentials { | |
username name | |
password pw | |
} | |
} | |
} | |
} | |
signing { | |
def key = findProperty('signingKey') | |
def pw = findProperty('signingPassword') | |
required { signingKey != null && signingPassword != null } | |
useInMemoryPgpKeys(key, pw) | |
sign publishing.publications | |
} | |
} | |
nexusStaging { | |
packageGroup = 'com.linecorp' | |
def name = findProperty('nexusUsername') ?: '' | |
def pw = findProperty('nexusPassword') ?: '' | |
username = name | |
password = pw | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment