ffmpeg-kit/tools/release/android/release.template.gradle

106 lines
2.9 KiB
Groovy
Raw Normal View History

2021-02-28 15:43:12 +02:00
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
task javadoc(type: Javadoc) {
title = 'FFmpegKit'
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
2020-08-05 03:53:02 +03:00
}
2021-02-28 15:43:12 +02:00
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
artifacts {
archives javadocJar
archives sourcesJar
}
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
apply plugin: 'maven'
apply plugin: 'signing'
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
group = 'com.arthenica'
archivesBaseName = releaseProject
version = releaseVersionName
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
File propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(propertiesFile))
properties.each { name, value ->
ext[name] = value
2020-08-05 03:53:02 +03:00
}
}
ext {
2021-02-28 15:43:12 +02:00
publishedGroupId = group
2020-08-05 03:53:02 +03:00
artifact = releaseProject
2021-02-28 15:43:12 +02:00
libraryName = releaseProject
libraryVersion = version
2020-08-05 03:53:02 +03:00
libraryDescription = releaseProjectDescription
siteUrl = 'https://github.com/tanersener/ffmpeg-kit'
gitUrl = 'https://github.com/tanersener/ffmpeg-kit.git'
developerId = 'tanersener'
developerName = 'Taner Sener'
developerEmail = 'tanersener@gmail.com'
if (Project.hasProperty('releaseGPL')) {
licenseName = 'GNU General Public License version 3'
licenseUrl = 'https://www.gnu.org/licenses/gpl-3.0.txt'
} else {
licenseName = 'GNU Lesser General Public License, Version 3'
licenseUrl = 'https://www.gnu.org/licenses/lgpl-3.0.txt'
}
}
2021-02-28 15:43:12 +02:00
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
2020-08-05 03:53:02 +03:00
2021-02-28 15:43:12 +02:00
pom.project {
packaging 'aar'
name = libraryName
description = libraryDescription
url = siteUrl
licenses {
license {
name = licenseName
url = licenseUrl
}
2020-08-05 03:53:02 +03:00
}
2021-02-28 15:43:12 +02:00
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
2020-08-05 03:53:02 +03:00
}
}
}
}
}
2021-02-28 15:43:12 +02:00
signing {
sign configurations.archives
2020-08-05 03:53:02 +03:00
}