mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-25 10:07:14 +00:00
commit
5935de526c
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
|
||||
}
|
33
publish.gradle
Normal file
33
publish.gradle
Normal file
@ -0,0 +1,33 @@
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
ext {
|
||||
projectBintrayDir = "${project.group}/".replace(".", "/") + "${project.name}/${project.version}"
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
|
||||
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
publications = ["maven"]
|
||||
filesSpec {
|
||||
into "$projectBintrayDir"
|
||||
from("build/libs") {
|
||||
include "**/*.asc"
|
||||
}
|
||||
from("build/publications/maven") {
|
||||
rename 'pom-default.xml(.*)', "${project.name}-${project.version}.pom\$1"
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "maven.publish.gradle"
|
Loading…
Reference in New Issue
Block a user