mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
let's test this boi
This commit is contained in:
parent
43e34993c4
commit
04632af576
1 changed files with 13 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
||||||
|
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
|
||||||
import org.jetbrains.dokka.gradle.DokkaTask
|
import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
import org.jetbrains.kotlin.gradle.utils.provider
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
@ -67,9 +69,15 @@ android {
|
||||||
resValue("bool", "is_prerelease", "false")
|
resValue("bool", "is_prerelease", "false")
|
||||||
|
|
||||||
// Reads local.properties
|
// Reads local.properties
|
||||||
val localPropertiesFile = File(rootDir, "local.properties")
|
val localPropertiesProvider = objects.fileProperty()
|
||||||
val localProperties = Properties()
|
localPropertiesProvider.set(File(rootDir, "local.properties"))
|
||||||
localProperties.load(localPropertiesFile.inputStream())
|
val localProperties = localPropertiesProvider.map { file ->
|
||||||
|
val properties = Properties()
|
||||||
|
if (file.asFile.exists()) {
|
||||||
|
file.asFile.inputStream().use { properties.load(it) }
|
||||||
|
}
|
||||||
|
properties
|
||||||
|
}
|
||||||
|
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
"String",
|
"String",
|
||||||
|
@ -79,12 +87,12 @@ android {
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
"String",
|
"String",
|
||||||
"SIMKL_CLIENT_ID",
|
"SIMKL_CLIENT_ID",
|
||||||
"\"" + (System.getenv("SIMKL_CLIENT_ID") ?: localProperties.getProperty("simkl.id")) + "\""
|
"\"" + (System.getenv("SIMKL_CLIENT_ID") ?: localProperties.get().getProperty("simkl.id")) + "\""
|
||||||
)
|
)
|
||||||
buildConfigField(
|
buildConfigField(
|
||||||
"String",
|
"String",
|
||||||
"SIMKL_CLIENT_SECRET",
|
"SIMKL_CLIENT_SECRET",
|
||||||
"\"" + (System.getenv("SIMKL_CLIENT_SECRET") ?: localProperties.getProperty("simkl.secret")) + "\""
|
"\"" + (System.getenv("SIMKL_CLIENT_SECRET") ?: localProperties.get().getProperty("simkl.secret")) + "\""
|
||||||
)
|
)
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue