~captainepoch/husky

ref: 0351132655d626cd60a1da70a2e999c44b186e76 husky/husky/buildSrc/src/main/kotlin/Dependencies.kt -rw-r--r-- 1.9 KiB
03511326Adolfo Santiago Add *aar files to ignore 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import java.util.Locale
import org.gradle.api.JavaVersion
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.kotlin.dsl.maven

const val kotlinVersion = "1.5.32"

object AndroidSDK {
    const val compileSdk = 30
    const val buildTools = "30.0.3"
}

object CustomHuskyBuild {
    const val applicationName = "Husky"
    const val customLogo = ""
    const val customInstance = ""
    const val supportAccountUrl = "https://huskyapp.dev/users/husky"
}

object DefaultConfig {
    const val applicationID = "su.xash.husky"
    const val minSdk = 23
    const val targetSdk = 30
    const val versionCodeRel = 171
    const val versionNameRel = "1.0.2"

    val javaVersion = JavaVersion.VERSION_11
    val jvmTarget = javaVersion.toString()

    const val instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

    const val encoding = "UTF-8"
}

object BetaConfig {
    const val betaSuffix = "beta"
    const val betaSuffixVersion = "3"
}

object BuildTypes {
    const val debug = "debug"
    const val release = "release"
}

object Flavors {
    object Dimensions {
        const val husky = "husky"
        const val release = "release"
    }

    const val husky = "husky"
    const val beta = "beta"
    const val stable = "stable"
}

object ProguardFile {
    const val defaultFile = "proguard-android-optimize.txt"
    const val defaultRules = "proguard-rules.pro"
}

object BuildTasks {
    const val taskTypeClean = "clean"
}

// Function to add repositories to the project.
fun addRepos(handler: RepositoryHandler) {
    handler.google()
    handler.gradlePluginPortal()
    handler.maven(url = "https://jitpack.io")
    handler.maven(url = "https://plugins.gradle.org/m2/")
}

// Function to check stable versions
fun isNonStable(version: String): Boolean {
    val stableKeyword = listOf("a", "alpha", "beta", "final", "ga", "m", "release", "rc")
        .any { version.toLowerCase(Locale.ROOT).contains(it) }
    return stableKeyword.not()
}