2020-08-18 06:50:11 +00:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
2020-09-22 12:04:10 +00:00
|
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
2020-08-18 06:50:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2020-09-22 12:04:10 +00:00
|
|
|
classpath "com.github.breadmoirai:github-release:$github_release_plugin_version"
|
2020-08-18 06:50:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version" apply false
|
|
|
|
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" apply false
|
|
|
|
}
|
2020-09-22 12:04:10 +00:00
|
|
|
|
|
|
|
private String getCurrentVersionChangelog() {
|
|
|
|
OutputStream changelogDataOS = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
standardOutput = changelogDataOS
|
|
|
|
commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
|
|
|
|
}
|
|
|
|
|
|
|
|
return changelogDataOS.toString().trim()
|
|
|
|
}
|
|
|
|
|
2020-09-22 12:12:48 +00:00
|
|
|
if (new File(projectDir, "secret.gradle").exists()) {
|
|
|
|
apply from: './secret.gradle'
|
|
|
|
apply plugin: "com.github.breadmoirai.github-release"
|
|
|
|
|
2020-09-22 12:04:10 +00:00
|
|
|
githubRelease {
|
|
|
|
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
|
|
|
|
|
|
|
owner "InsanusMokrassar"
|
|
|
|
repo "TelegramBotAPI"
|
|
|
|
|
|
|
|
tagName "$library_version"
|
|
|
|
releaseName "$library_version"
|
|
|
|
targetCommitish "$library_version"
|
|
|
|
|
|
|
|
body getCurrentVersionChangelog()
|
|
|
|
}
|
|
|
|
}
|