mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
commit
d472d371ed
@ -1,5 +1,13 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 0.32.4
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.4.21` -> `1.4.30`
|
||||
* `Klock`: `2.0.4` -> `2.0.6`
|
||||
* `MicroUtils`: `0.4.23` -> `0.4.24`
|
||||
|
||||
## 0.32.3
|
||||
|
||||
* `Behaviour Builder`:
|
||||
|
@ -5,18 +5,18 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
kotlin_version=1.4.21
|
||||
kotlin_version=1.4.30
|
||||
kotlin_coroutines_version=1.4.2
|
||||
kotlin_serialisation_runtime_version=1.0.1
|
||||
klock_version=2.0.4
|
||||
kotlin_serialisation_runtime_version=1.1.0-RC
|
||||
klock_version=2.0.6
|
||||
uuid_version=0.2.3
|
||||
ktor_version=1.5.1
|
||||
|
||||
micro_utils_version=0.4.23
|
||||
micro_utils_version=0.4.24
|
||||
|
||||
javax_activation_version=1.1.1
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=0.32.3
|
||||
library_version=0.32.4
|
||||
|
||||
github_release_plugin_version=2.2.12
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
|
||||
|
@ -29,7 +29,9 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
jvm {
|
||||
compilations.main.kotlinOptions.useIR = true
|
||||
}
|
||||
js(BOTH) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
@ -1 +1 @@
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Core","description":"Library for Object-Oriented and type-safe work with Telegram Bot API","url":"https://insanusmokrassar.github.io/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Core","description":"Library for Object-Oriented and type-safe work with Telegram Bot API","url":"https://insanusmokrassar.github.io/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
@ -4,22 +4,6 @@ apply plugin: 'signing'
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
task sourceJar (type : Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
artifact sourceJar
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
@ -64,6 +48,16 @@ publishing {
|
||||
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,5 +65,5 @@ publishing {
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
publishing.publications.forEach { sign it }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
@ -17,7 +17,9 @@ class CommonLimiter(
|
||||
@Transient
|
||||
private val scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
|
||||
) : RequestLimiter {
|
||||
@Transient
|
||||
private val quotaSemaphore = Semaphore(lockCount)
|
||||
@Transient
|
||||
private val counterRegeneratorJob = scope.launch {
|
||||
val regenDelay: MilliSeconds = (regenTime.toDouble() / lockCount).roundToLong()
|
||||
while (isActive) {
|
||||
|
@ -37,11 +37,12 @@ class ExceptionsOnlyLimiter(
|
||||
override suspend fun <T> limit(block: suspend () -> T): T {
|
||||
while (true) {
|
||||
lockState.first { !it }
|
||||
var throwable: Throwable? = null
|
||||
val result = safely({
|
||||
when (it) {
|
||||
throwable = when (it) {
|
||||
is TooMuchRequestsException -> {
|
||||
lock(it.retryAfter.leftToRetry)
|
||||
Result.failure(it)
|
||||
it
|
||||
}
|
||||
is ClientRequestException -> {
|
||||
if (it.response.status == HttpStatusCode.TooManyRequests) {
|
||||
@ -49,15 +50,16 @@ class ExceptionsOnlyLimiter(
|
||||
} else {
|
||||
throw it
|
||||
}
|
||||
Result.failure(it)
|
||||
it
|
||||
}
|
||||
else -> throw it
|
||||
}
|
||||
null
|
||||
}) {
|
||||
Result.success(block())
|
||||
block()
|
||||
}
|
||||
if (result.isSuccess) {
|
||||
return result.getOrNull()!!
|
||||
if (throwable == null) {
|
||||
return result!!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ data class SetChatPhoto (
|
||||
override fun method(): String = "setChatPhoto"
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
@Transient
|
||||
override val mediaMap: Map<String, MultipartFile> = mapOf(photoField to photo)
|
||||
@Transient
|
||||
override val paramsJson: JsonObject = toJson(serializer())
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package dev.inmo.tgbotapi.requests.send.polls
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import com.soywiz.klock.TimeSpan
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.*
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
||||
@ -16,6 +17,11 @@ import kotlinx.serialization.*
|
||||
|
||||
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<PollContent>> = TelegramBotAPIMessageDeserializationStrategyClass()
|
||||
|
||||
private inline val ApproximateScheduledCloseInfo.openPeriod
|
||||
get() = openDuration.millisecondsLong.div(1000)
|
||||
private inline val ExactScheduledCloseInfo.closeDate
|
||||
get() = closeDateTime.unixMillisLong.div(1000)
|
||||
|
||||
private fun checkPollInfo(
|
||||
question: String,
|
||||
options: List<String>
|
||||
@ -138,12 +144,23 @@ sealed class SendPoll : SendMessageRequest<ContentMessage<PollContent>>,
|
||||
abstract val options: List<String>
|
||||
abstract val isAnonymous: Boolean
|
||||
abstract val isClosed: Boolean
|
||||
abstract val closeInfo: ScheduledCloseInfo?
|
||||
abstract val type: String
|
||||
|
||||
internal abstract val openPeriod: LongSeconds?
|
||||
internal abstract val closeDate: LongSeconds?
|
||||
|
||||
protected val creationDate = DateTime.now()
|
||||
open val closeInfo: ScheduledCloseInfo?
|
||||
get() {
|
||||
val openPeriod = openPeriod
|
||||
val closeDate = closeDate
|
||||
return when {
|
||||
openPeriod != null -> openPeriod.asApproximateScheduledCloseInfo(creationDate)
|
||||
closeDate != null -> closeDate.asExactScheduledCloseInfo
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
override fun method(): String = "sendPoll"
|
||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<PollContent>>
|
||||
get() = commonResultDeserializer
|
||||
@ -163,8 +180,10 @@ data class SendRegularPoll(
|
||||
override val isClosed: Boolean = false,
|
||||
@SerialName(allowsMultipleAnswersField)
|
||||
val allowMultipleAnswers: Boolean = false,
|
||||
@Transient
|
||||
override val closeInfo: ScheduledCloseInfo? = null,
|
||||
@SerialName(openPeriodField)
|
||||
override val openPeriod: LongSeconds?= null,
|
||||
@SerialName(closeDateField)
|
||||
override val closeDate: LongSeconds?,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(replyToMessageIdField)
|
||||
@ -178,20 +197,39 @@ data class SendRegularPoll(
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
|
||||
@SerialName(openPeriodField)
|
||||
override val openPeriod: LongSeconds?
|
||||
= (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.millisecondsLong ?.div(1000)
|
||||
|
||||
@SerialName(closeDateField)
|
||||
override val closeDate: LongSeconds?
|
||||
= (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000)
|
||||
|
||||
init {
|
||||
checkPollInfo(question, options)
|
||||
closeInfo ?.checkSendData()
|
||||
}
|
||||
}
|
||||
|
||||
fun SendRegularPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
isAnonymous: Boolean = true,
|
||||
isClosed: Boolean = false,
|
||||
allowMultipleAnswers: Boolean = false,
|
||||
closeInfo: ScheduledCloseInfo? = null,
|
||||
disableNotification: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = SendRegularPoll(
|
||||
chatId,
|
||||
question,
|
||||
options,
|
||||
isAnonymous,
|
||||
isClosed,
|
||||
allowMultipleAnswers,
|
||||
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||
disableNotification,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
fun SendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
@ -253,6 +291,39 @@ fun SendQuizPoll(
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
internal fun SendQuizPoll(
|
||||
chatId: ChatIdentifier,
|
||||
question: String,
|
||||
options: List<String>,
|
||||
correctOptionId: Int,
|
||||
isAnonymous: Boolean = true,
|
||||
isClosed: Boolean = false,
|
||||
explanation: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
rawEntities: List<RawMessageEntity>? = null,
|
||||
closeInfo: ScheduledCloseInfo? = null,
|
||||
disableNotification: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = SendQuizPoll(
|
||||
chatId,
|
||||
question,
|
||||
options,
|
||||
correctOptionId,
|
||||
isAnonymous,
|
||||
isClosed,
|
||||
explanation,
|
||||
parseMode,
|
||||
rawEntities,
|
||||
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||
disableNotification,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class SendQuizPoll internal constructor(
|
||||
@SerialName(chatIdField)
|
||||
@ -273,8 +344,10 @@ data class SendQuizPoll internal constructor(
|
||||
override val parseMode: ParseMode? = null,
|
||||
@SerialName(explanationEntitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
@Transient
|
||||
override val closeInfo: ScheduledCloseInfo? = null,
|
||||
@SerialName(openPeriodField)
|
||||
override val openPeriod: LongSeconds? = null,
|
||||
@SerialName(closeDateField)
|
||||
override val closeDate: LongSeconds? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(replyToMessageIdField)
|
||||
@ -291,14 +364,6 @@ data class SendQuizPoll internal constructor(
|
||||
rawEntities ?.asTextParts(explanation ?: return@lazy null) ?.justTextSources()
|
||||
}
|
||||
|
||||
@SerialName(openPeriodField)
|
||||
override val openPeriod: LongSeconds?
|
||||
= (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.millisecondsLong ?.div(1000)
|
||||
|
||||
@SerialName(closeDateField)
|
||||
override val closeDate: LongSeconds?
|
||||
= (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000)
|
||||
|
||||
init {
|
||||
checkPollInfo(question, options)
|
||||
closeInfo ?.checkSendData()
|
||||
|
@ -4,13 +4,13 @@ import dev.inmo.tgbotapi.types.dataField
|
||||
import dev.inmo.tgbotapi.types.passport.credentials.DataCredentials
|
||||
import dev.inmo.tgbotapi.types.passport.credentials.EndDataCredentials
|
||||
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class AddressSecureValue(
|
||||
@SerialName(dataField)
|
||||
override val data: DataCredentials
|
||||
) : SecureValueWithData {
|
||||
@Transient
|
||||
override val credentials: List<EndDataCredentials> = listOf(data)
|
||||
}
|
@ -4,13 +4,13 @@ import dev.inmo.tgbotapi.types.dataField
|
||||
import dev.inmo.tgbotapi.types.passport.credentials.DataCredentials
|
||||
import dev.inmo.tgbotapi.types.passport.credentials.EndDataCredentials
|
||||
import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class PersonalDetailsSecureValue(
|
||||
@SerialName(dataField)
|
||||
override val data: DataCredentials
|
||||
) : SecureValueWithData {
|
||||
@Transient
|
||||
override val credentials: List<EndDataCredentials> = listOf(data)
|
||||
}
|
@ -33,6 +33,9 @@ val LongSeconds.asApproximateScheduledCloseInfo
|
||||
get() = ApproximateScheduledCloseInfo(
|
||||
TimeSpan(this * 1000.0)
|
||||
)
|
||||
fun LongSeconds.asApproximateScheduledCloseInfo(startPoint: DateTime) = ApproximateScheduledCloseInfo(
|
||||
TimeSpan(this * 1000.0), startPoint
|
||||
)
|
||||
val LongSeconds.asExactScheduledCloseInfo
|
||||
get() = ExactScheduledCloseInfo(
|
||||
DateTime(unixMillis = this * 1000.0)
|
||||
|
@ -29,7 +29,9 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
jvm {
|
||||
compilations.main.kotlinOptions.useIR = true
|
||||
}
|
||||
js(BOTH) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
@ -1 +1 @@
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Extensions for API","description":"API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-api","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Extensions for API","description":"API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-api","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
@ -4,22 +4,6 @@ apply plugin: 'signing'
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
task sourceJar (type : Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
artifact sourceJar
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
@ -64,6 +48,16 @@ publishing {
|
||||
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,5 +65,5 @@ publishing {
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
publishing.publications.forEach { sign it }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
jvm {
|
||||
compilations.main.kotlinOptions.useIR = true
|
||||
}
|
||||
js(BOTH) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
@ -1 +1 @@
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Steps Extensions","description":"This extensions project contains tools for simple interaction with chats","url":"https://insanusmokrassar.github.io/TelegramBotAPI/tgbotapi.extensions.steps","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Steps Extensions","description":"This extensions project contains tools for simple interaction with chats","url":"https://insanusmokrassar.github.io/TelegramBotAPI/tgbotapi.extensions.steps","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
@ -4,22 +4,6 @@ apply plugin: 'signing'
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
task sourceJar (type : Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
artifact sourceJar
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
@ -64,6 +48,16 @@ publishing {
|
||||
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,5 +65,5 @@ publishing {
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
publishing.publications.forEach { sign it }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
jvm {
|
||||
compilations.main.kotlinOptions.useIR = true
|
||||
}
|
||||
js(BOTH) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
@ -1 +1 @@
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Utility Extensions","description":"Util extensions for more useful work with updates and other things","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-utils","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Utility Extensions","description":"Util extensions for more useful work with updates and other things","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI-extensions-utils","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
@ -4,22 +4,6 @@ apply plugin: 'signing'
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
task sourceJar (type : Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
artifact sourceJar
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
@ -64,6 +48,16 @@ publishing {
|
||||
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,5 +65,5 @@ publishing {
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
publishing.publications.forEach { sign it }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ repositories {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
jvm {
|
||||
compilations.main.kotlinOptions.useIR = true
|
||||
}
|
||||
js(BOTH) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
@ -1 +1 @@
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API","description":"This project just include all subproject of TelegramBotAPI","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
||||
{"bintrayConfig":{"repo":"TelegramBotAPI","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI","autoPublish":true,"overridePublish":true},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API","description":"This project just include all subproject of TelegramBotAPI","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","includeGpgSigning":true,"publishToMavenCentral":true,"developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]}}
|
@ -4,22 +4,6 @@ apply plugin: 'signing'
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
task sourceJar (type : Jar) {
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
project.publishing.publications.all {
|
||||
// rename artifacts
|
||||
groupId "${project.group}"
|
||||
if (it.name.contains('kotlinMultiplatform')) {
|
||||
artifactId = "${project.name}"
|
||||
artifact sourceJar
|
||||
} else {
|
||||
artifactId = "${project.name}-$name"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
@ -64,6 +48,16 @@ publishing {
|
||||
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -71,5 +65,5 @@ publishing {
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
publishing.publications.forEach { sign it }
|
||||
sign publishing.publications
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user