mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 11:36:07 -04:00
77 lines
2.4 KiB
Groovy
77 lines
2.4 KiB
Groovy
apply plugin: 'maven-publish'
|
|
apply plugin: 'signing'
|
|
|
|
task androidSourcesJar(type: Jar) {
|
|
archiveClassifier.set('sources')
|
|
if (project.plugins.findPlugin("com.android.library")) {
|
|
// For Android libraries
|
|
from android.sourceSets.main.java.srcDirs
|
|
from android.sourceSets.main.kotlin.srcDirs
|
|
} else {
|
|
// For pure Kotlin libraries, in case you have them
|
|
from sourceSets.main.java.srcDirs
|
|
from sourceSets.main.kotlin.srcDirs
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives androidSourcesJar
|
|
}
|
|
|
|
group = PUBLISH_GROUP_ID
|
|
version = rootVersionName
|
|
|
|
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
|
|
|
|
pom {
|
|
name = PUBLISH_ARTIFACT_ID
|
|
description = PUBLISH_DESCRIPTION
|
|
url = 'https://github.com/matrix-org/matrix-rust-components-kotlin'
|
|
licenses {
|
|
license {
|
|
name = 'The Apache Software License, Version 2.0'
|
|
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = 'matrixdev'
|
|
name = 'matrixdev'
|
|
email = 'android@element.io'
|
|
}
|
|
}
|
|
|
|
scm {
|
|
connection = 'scm:git:git://github.com/matrix-org/matrix-rust-components-kotlin.git'
|
|
developerConnection = 'scm:git:ssh://git@github.com/matrix-org/matrix-rust-components-kotlin.git'
|
|
url = 'https://github.com/matrix-org/matrix-rust-components-kotlin'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
useInMemoryPgpKeys(
|
|
rootProject.ext["signing.keyId"],
|
|
rootProject.ext["signing.key"],
|
|
rootProject.ext["signing.password"],
|
|
)
|
|
sign publishing.publications
|
|
} |