mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:59:18 +01:00
Move some build.gradle.kts content around
This commit is contained in:
parent
10bf430ce6
commit
9ab29f5b7f
@ -14,6 +14,10 @@ plugins {
|
|||||||
id("com.github.zellius.shortcut-helper")
|
id("com.github.zellius.shortcut-helper")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
|
||||||
|
apply(plugin = "com.google.gms.google-services")
|
||||||
|
}
|
||||||
|
|
||||||
shortcutHelper.setFilePath("./shortcuts.xml")
|
shortcutHelper.setFilePath("./shortcuts.xml")
|
||||||
|
|
||||||
|
|
||||||
@ -26,24 +30,6 @@ fun runCommand(command: String): String {
|
|||||||
return String(byteOut.toByteArray()).trim()
|
return String(byteOut.toByteArray()).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Git is needed in your system PATH for these commands to work.
|
|
||||||
// If it's not installed, you can return a random value as a workaround
|
|
||||||
fun getCommitCount(): String {
|
|
||||||
return runCommand("git rev-list --count HEAD")
|
|
||||||
// return "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getGitSha(): String {
|
|
||||||
return runCommand("git rev-parse --short HEAD")
|
|
||||||
// return "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getBuildTime(): String {
|
|
||||||
val df = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
|
|
||||||
df.timeZone = TimeZone.getTimeZone("UTC")
|
|
||||||
return df.format(Date())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion(AndroidConfig.compileSdk)
|
compileSdkVersion(AndroidConfig.compileSdk)
|
||||||
@ -294,20 +280,6 @@ dependencies {
|
|||||||
// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.4")
|
// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath(kotlin("gradle-plugin", version = BuildPluginsVersion.KOTLIN))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
|
// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
|
||||||
withType<KotlinCompile> {
|
withType<KotlinCompile> {
|
||||||
@ -333,6 +305,36 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
|
|
||||||
apply(plugin = "com.google.gms.google-services")
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath(kotlin("gradle-plugin", version = BuildPluginsVersion.KOTLIN))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Git is needed in your system PATH for these commands to work.
|
||||||
|
// If it's not installed, you can return a random value as a workaround
|
||||||
|
fun getCommitCount(): String {
|
||||||
|
return runCommand("git rev-list --count HEAD")
|
||||||
|
// return "1"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getGitSha(): String {
|
||||||
|
return runCommand("git rev-parse --short HEAD")
|
||||||
|
// return "1"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getBuildTime(): String {
|
||||||
|
val df = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
|
||||||
|
df.timeZone = TimeZone.getTimeZone("UTC")
|
||||||
|
return df.format(Date())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user