-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
8 changed files
with
321 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'org.jetbrains.dokka' | ||
|
||
task androidSourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
if (project.plugins.findPlugin("com.android.library")) { | ||
from android.sourceSets.main.java.srcDirs | ||
from android.sourceSets.main.kotlin.srcDirs | ||
} else { | ||
from sourceSets.main.java.srcDirs | ||
from sourceSets.main.kotlin.srcDirs | ||
} | ||
} | ||
|
||
tasks.withType(dokkaHtmlPartial.getClass()).configureEach { | ||
pluginsMapConfiguration.set( | ||
["org.jetbrains.dokka.base.DokkaBase": """{ "separateInheritedMembers": true}"""] | ||
) | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) { | ||
archiveClassifier.set('javadoc') | ||
from dokkaJavadoc.outputDirectory | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives javadocJar | ||
} | ||
|
||
group = PUBLISH_GROUP_ID | ||
version = PUBLISH_VERSION | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId PUBLISH_GROUP_ID | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version PUBLISH_VERSION | ||
if (project.plugins.findPlugin("com.android.library")) { | ||
from components.release | ||
} else { | ||
from components.java | ||
} | ||
|
||
artifact androidSourcesJar | ||
artifact javadocJar | ||
|
||
pom { | ||
name = PUBLISH_ARTIFACT_ID | ||
description = 'Stream Chat official Android SDK' | ||
url = 'https://github.com/getstream/stream-chat-android' | ||
licenses { | ||
license { | ||
name = 'Stream License' | ||
url = 'https://github.com/GetStream/stream-chat-android/blob/main/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'zeoflow' | ||
name = 'ZeoFlow SRL' | ||
email = 'open-srouce@zeoflow.com' | ||
} | ||
developer { | ||
id = 'teodorhmx1' | ||
name = 'Teodor G.' | ||
email = 'teo@zeoflow.com' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:github.com/getstream/stream-chat-android.git' | ||
developerConnection = 'scm:git:ssh://github.com/getstream/stream-chat-android.git' | ||
url = 'https://github.com/getstream/stream-chat-android/tree/main' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
ext["signing.keyId"] = rootProject.ext["signing.keyId"] | ||
ext["signing.password"] = rootProject.ext["signing.password"] | ||
ext["signing.secretKeyRingFile"] = rootProject.ext["signing.secretKeyRingFile"] | ||
|
||
signing { | ||
sign publishing.publications | ||
} |
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 |
---|---|---|
@@ -0,0 +1,211 @@ | ||
apply plugin: 'maven-publish' | ||
|
||
task androidJavadoc(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
android.libraryVariants.all { variant -> | ||
if (variant.name == 'release') { | ||
owner.classpath += variant.javaCompileProvider.get().classpath | ||
} | ||
} | ||
|
||
exclude '**/R.html', '**/R.*.html', '**/index.html' | ||
options.encoding 'utf-8' | ||
options { | ||
addStringOption 'docencoding', 'utf-8' | ||
addStringOption 'charset', 'utf-8' | ||
links 'https://docs.oracle.com/javase/7/docs/api/' | ||
links 'https://d.android.com/reference' | ||
links 'https://developer.android.com/reference/androidx/' | ||
} | ||
} | ||
|
||
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { | ||
archiveClassifier.set('javadoc') | ||
from androidJavadoc.destinationDir | ||
|
||
preserveFileTimestamps = false | ||
reproducibleFileOrder = true | ||
} | ||
|
||
task javaSourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
from android.sourceSets.main.java.srcDirs | ||
|
||
preserveFileTimestamps = false | ||
reproducibleFileOrder = true | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
|
||
from components.release | ||
|
||
artifact androidJavadocJar | ||
artifact javaSourcesJar | ||
|
||
groupId = GROUP | ||
version = VERSION_NAME | ||
|
||
pom { | ||
name = artifactId | ||
description = '' | ||
url = '' | ||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
// distribution POM_LICENCE_DIST | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'zeoflow' | ||
name = 'ZeoFLow SRL' | ||
email = 'open-source@zeoflow.com' | ||
} | ||
developer { | ||
id = 'teodorhmx1' | ||
name = 'Teodor G.' | ||
email = 'teo@zeoflow.com' | ||
} | ||
} | ||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases') | ||
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots') | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username NEXUS_USERNAME | ||
password NEXUS_PASSWORD | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
//apply plugin: 'maven-publish' | ||
//apply plugin: 'signing' | ||
|
||
//afterEvaluate { | ||
// publishing { | ||
// publications { | ||
// mavenRelease(MavenPublication) { | ||
// from components.release | ||
// } | ||
// } | ||
// } | ||
//} | ||
|
||
//def isReleaseBuild() { | ||
// return VERSION_NAME.contains("SNAPSHOT") == false | ||
//} | ||
// | ||
//def getReleaseRepositoryUrl() { | ||
// return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
// : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
//} | ||
// | ||
//def getSnapshotRepositoryUrl() { | ||
// return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
// : "https://oss.sonatype.org/content/repositories/snapshots/" | ||
//} | ||
// | ||
//def getRepositoryUsername() { | ||
// return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" | ||
//} | ||
// | ||
//def getRepositoryPassword() { | ||
// return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" | ||
//} | ||
// | ||
//java { | ||
// withJavadocJar() | ||
// withSourcesJar() | ||
//} | ||
// | ||
// | ||
//afterEvaluate { | ||
// publishing { | ||
// publications { | ||
// maven(MavenPublication) { | ||
// groupId = GROUP | ||
// artifactId = POM_ARTIFACT_ID | ||
// version = VERSION_NAME | ||
// pom { | ||
// name POM_NAME | ||
// packaging POM_PACKAGING | ||
// description POM_DESCRIPTION | ||
// url POM_URL | ||
//// properties = [ | ||
//// myProp: "value", | ||
//// "prop.with.dots": "anotherValue" | ||
//// ] | ||
// licenses { | ||
// license { | ||
// name POM_LICENCE_NAME | ||
// url POM_LICENCE_URL | ||
// distribution POM_LICENCE_DIST | ||
// } | ||
// } | ||
// developers { | ||
// developer { | ||
// id = 'zeoflow' | ||
// name = 'ZeoFLow SRL' | ||
// email = 'open-source@zeoflow.com' | ||
// } | ||
// developer { | ||
// id = 'teodorhmx1' | ||
// name = 'Teodor G.' | ||
// email = 'teo@zeoflow.com' | ||
// } | ||
// } | ||
// scm { | ||
// url POM_SCM_URL | ||
// connection POM_SCM_CONNECTION | ||
// developerConnection POM_SCM_DEV_CONNECTION | ||
// } | ||
// } | ||
// } | ||
// } | ||
// repositories { | ||
// maven { | ||
// def releasesRepoUrl = layout.buildDirectory.dir('repos/releases') | ||
// def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots') | ||
// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
// credentials { | ||
// username NEXUS_USERNAME | ||
// password NEXUS_PASSWORD | ||
// } | ||
// } | ||
// } | ||
// } | ||
//} | ||
// | ||
//task cleanBuildPublishLocal(type: GradleBuild) { | ||
// tasks = ['clean', 'build', 'publishToMavenLocal'] | ||
//} | ||
// | ||
//task cleanBuildPublish(type: GradleBuild) { | ||
// tasks = ['clean', 'build', 'publish'] | ||
//} | ||
// | ||
//signing { | ||
// sign configurations.archives | ||
//} | ||
// | ||
//javadoc { | ||
// if(JavaVersion.current().isJava9Compatible()) { | ||
// options.addBooleanOption('html5', true) | ||
// } | ||
//} |
Oops, something went wrong.