mirror of
https://github.com/ethauvin/kotlin-pluralizer.git
synced 2025-04-25 08:47:12 -07:00
added required files to publish
This commit is contained in:
parent
156449c8a8
commit
f28387ed16
8 changed files with 128 additions and 39 deletions
|
@ -1,5 +1,17 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.jfrog.bintray' version '1.6'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
android {
|
||||
compileSdkVersion 24
|
||||
|
@ -30,3 +42,5 @@ dependencies {
|
|||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
//apply from: 'publish.gradle'
|
||||
|
|
66
library/publish.gradle
Normal file
66
library/publish.gradle
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
group "$ext_groupId"
|
||||
version "$ext_version"
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
MyPublication(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
groupId "$ext_groupId"
|
||||
artifactId "$ext_artifactId"
|
||||
version "$ext_version"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
task javadoc(type: Javadoc) {
|
||||
failOnError false
|
||||
source = android.sourceSets.main.java.sourceFiles
|
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||
classpath += configurations.compile
|
||||
}
|
||||
|
||||
// build a jar with javadoc
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = System.getenv('BINTRAY_USER')
|
||||
key = System.getenv('BINTRAY_API_KEY')
|
||||
|
||||
dryRun = false
|
||||
publish = true
|
||||
|
||||
publications = ['MyPublication']
|
||||
pkg {
|
||||
repo = 'maven'
|
||||
name = "$ext_artifactId"
|
||||
licenses = ['Apache-2.0']
|
||||
labels = ['android', 'gradle-plugin']
|
||||
|
||||
publicDownloadNumbers = true
|
||||
vcsUrl = "$ext_vcsUrl"
|
||||
|
||||
version {
|
||||
name = "$ext_version"
|
||||
desc = "$ext_description"
|
||||
released = new Date()
|
||||
gpg {
|
||||
sign = true // Determines whether to GPG sign the files.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue