mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 23:07:26 -04:00
84 lines
1.8 KiB
Groovy
84 lines
1.8 KiB
Groovy
import plugin.KiwixConfigurationPlugin
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("com.github.triplet.play") version("2.5.0")
|
|
}
|
|
apply plugin: KiwixConfigurationPlugin
|
|
|
|
apply from: rootProject.file("jacoco.gradle")
|
|
|
|
ext {
|
|
versionMajor = 3
|
|
versionMinor = 0
|
|
versionPatch = 4
|
|
}
|
|
|
|
private String generateVersionName() {
|
|
"${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
|
|
}
|
|
|
|
/*
|
|
* max version code: 21-0-0-00-00-00
|
|
* our template : UU-D-A-ZZ-YY-XX
|
|
* where:
|
|
* X = patch version
|
|
* Y = minor version
|
|
* Z = major version (+ 20 to distinguish from previous, non semantic, versions of the app)
|
|
* A = number representing ABI split
|
|
* D = number representing density split
|
|
* U = unused
|
|
*/
|
|
|
|
private Integer generateVersionCode() {
|
|
20 * 10000 +
|
|
(ext.versionMajor * 10000) +
|
|
(ext.versionMinor * 100) +
|
|
(ext.versionPatch)
|
|
}
|
|
|
|
def buildNumber = System.getenv('TRAVIS_BUILD_NUMBER') ?: "dev"
|
|
|
|
android {
|
|
|
|
defaultConfig {
|
|
archivesBaseName = "$buildNumber"
|
|
resValue "string", "app_name", "Kiwix"
|
|
resValue "string", "app_search_string", "Search Kiwix"
|
|
versionCode generateVersionCode()
|
|
versionName generateVersionName()
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
multiDexKeepProguard file("multidex-instrumentation-config.pro")
|
|
buildConfigField "boolean", "KIWIX_ERROR_ACTIVITY", "false"
|
|
}
|
|
|
|
release {
|
|
buildConfigField "boolean", "KIWIX_ERROR_ACTIVITY", "true"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
androidTest {
|
|
java.srcDirs += "$rootDir/core/src/sharedTestFunctions/java"
|
|
}
|
|
}
|
|
}
|
|
|
|
play {
|
|
enabled = true
|
|
serviceAccountCredentials = file("../google.json")
|
|
track = "alpha"
|
|
releaseStatus = "draft"
|
|
resolutionStrategy = "fail"
|
|
}
|
|
|
|
dependencies {
|
|
implementation(Libs.squidb)
|
|
implementation(Libs.squidb_annotations)
|
|
implementation(Libs.ink_page_indicator)
|
|
kapt(Libs.squidb_processor)
|
|
}
|