1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-10 10:23:47 +00:00
tgbotapi/build.gradle

67 lines
1.7 KiB
Groovy

buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath libs.kotlin.gradle.plugin
classpath libs.kotlin.ksp.plugin
classpath libs.kotlin.serialization.plugin
classpath libs.kotlin.dokka.plugin
classpath libs.github.release.plugin
}
}
plugins {
alias(libs.plugins.kotlin.dokka)
alias(libs.plugins.versions)
}
// temporal crutch until legacy tests will be stabled or legacy target will be removed
allprojects {
repositories {
mavenLocal()
mavenCentral()
google()
maven { url "https://git.inmo.dev/api/packages/InsanusMokrassar/maven" }
}
if (it != rootProject.findProject("docs")) {
tasks.whenTaskAdded { task ->
if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") {
task.enabled = false
}
}
}
}
apply from: "./extensions.gradle"
private String getCurrentVersionChangelog() {
OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
standardOutput = changelogDataOS
commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
}
return changelogDataOS.toString().trim()
}
if (new File(projectDir, "secret.gradle").exists()) {
apply from: './secret.gradle'
apply plugin: "com.github.breadmoirai.github-release"
githubRelease {
token "${project.property('GITHUB_RELEASE_TOKEN')}"
owner "InsanusMokrassar"
repo "TelegramBotAPI"
tagName "v$library_version"
releaseName "$library_version"
targetCommitish "$library_version"
body getCurrentVersionChangelog()
}
}