com.avito.plugin.SignExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signer Show documentation
Show all versions of signer Show documentation
Collection of infrastructure libraries and gradle plugins of Avito Android project
The newest version!
package com.avito.plugin
import com.android.builder.model.BuildType
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.kotlin.dsl.property
import javax.inject.Inject
public abstract class SignExtension @Inject constructor(private val objects: ObjectFactory) {
internal val apkSignTokens = mutableMapOf>()
internal val bundleSignTokens = mutableMapOf>()
public abstract val enabled: Property
public abstract val url: Property
/**
* http client read and write timeouts
*/
public abstract val readWriteTimeoutSec: Property
@Deprecated("use fun with variant name", ReplaceWith("apk(variant, token)"))
public fun apk(variant: BuildType, token: String?) {
apkSignTokens[variant.name] = objects.property().value(token)
}
@Deprecated("use fun with variant name", ReplaceWith("bundle(variant, token)"))
public fun bundle(variant: BuildType, token: String?) {
bundleSignTokens[variant.name] = objects.property().value(token)
}
// AGP 7.1 will introduce extensions for build variants
// see http://links.k.avito.ru/M9W
public fun apk(variant: String, token: Property) {
apkSignTokens[variant] = token
}
public fun bundle(variant: String, token: Property) {
bundleSignTokens[variant] = token
}
public fun apk(variant: String, token: String?) {
apkSignTokens[variant] = objects.property().value(token)
}
public fun bundle(variant: String, token: String?) {
bundleSignTokens[variant] = objects.property().value(token)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy