mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
add publishing
This commit is contained in:
parent
89eda29965
commit
0633db8889
16
build.gradle
16
build.gradle
@ -1,7 +1,5 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: "application"
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'kotlinx-serialization'
|
||||
project.version = "0.8"
|
||||
project.group = "com.github.insanusmokrassar"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@ -13,9 +11,16 @@ buildscript {
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'java-library'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'kotlinx-serialization'
|
||||
|
||||
apply from: "publish.gradle"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
@ -35,6 +40,3 @@ dependencies {
|
||||
// Use JUnit test framework
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
mainClassName = "com.github.insanusmokrassar.TelegramBotAPI.IndexKt"
|
||||
|
||||
|
@ -4,3 +4,5 @@ kotlin_coroutines_version=1.1.0
|
||||
kotlin_serialisation_runtime_version=0.9.1
|
||||
joda_time_version=2.10.1
|
||||
ktor_version=1.0.1
|
||||
|
||||
gradle_bintray_plugin_version=1.8.4
|
||||
|
58
maven.publish.gradle
Normal file
58
maven.publish.gradle
Normal file
@ -0,0 +1,58 @@
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
def pomConfig = {
|
||||
licenses {
|
||||
license {
|
||||
name "The Apache Software License, Version 2.0"
|
||||
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
name "Ovsiannikov Aleksei"
|
||||
email "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url "https://github.com/InsanusMokrassar/${project.name}"
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar) {
|
||||
from javadoc
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
groupId "${project.group}"
|
||||
artifactId "${project.name}"
|
||||
version "${project.version}"
|
||||
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
pom.withXml {
|
||||
def root = asNode()
|
||||
root.appendNode('description', 'It is one more project which wish to be useful and full Telegram Bots API bridge for Kotlin')
|
||||
root.appendNode('name', 'Telegram Bot API')
|
||||
root.children().last() + pomConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign publishing.publications.maven
|
||||
}
|
24
publish.gradle
Normal file
24
publish.gradle
Normal file
@ -0,0 +1,24 @@
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
bintray {
|
||||
user = System.getenv('BINTRAY_USER')
|
||||
key = System.getenv('BINTRAY_KEY')
|
||||
pkg {
|
||||
repo = 'StandardRepository'
|
||||
name = "${project.name}"
|
||||
vcsUrl = "https://github.com/InsanusMokrassar/${project.name}"
|
||||
licenses = ['Apache-2.0']
|
||||
version {
|
||||
name = "${project.version}"
|
||||
released = new Date()
|
||||
vcsTag = name
|
||||
gpg {
|
||||
sign = true
|
||||
passphrase = System.getenv('SIGN_PASSPHRASE')
|
||||
}
|
||||
}
|
||||
publications = ["maven"]
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "maven.publish.gradle"
|
Loading…
Reference in New Issue
Block a user