Gradle Improvements (#2311)

This commit is contained in:
Bart Louwers
2024-04-23 15:19:54 +02:00
committed by GitHub
parent 8ad141e213
commit b4dcdb1ba9
13 changed files with 34 additions and 51 deletions

View File

@@ -18,12 +18,11 @@ def obtainTestBuildType() {
}
android {
compileSdkVersion androidVersions.compileSdkVersion
defaultConfig {
applicationId "org.maplibre.android.testapp"
minSdkVersion androidVersions.minSdkVersion
targetSdkVersion androidVersions.targetSdkVersion
compileSdk 34
minSdkVersion 21
targetSdkVersion 33
versionCode 14
versionName "6.0.1"
testInstrumentationRunner "org.maplibre.android.InstrumentationRunner"

View File

@@ -146,7 +146,10 @@ class BenchmarkActivity : AppCompatActivity() {
private fun getBenchmarkInputData(): BenchmarkInputData {
// read input for benchmark from JSON file (on CI)
val jsonFile = File("${Environment.getExternalStorageDirectory()}/instrumentation-test-input")
val jsonFile = File("${Environment.getExternalStorageDirectory()}/instrumentation-test-input.json")
Logger.i(TAG, "Environment.getExternalStorageDirectory() = ${Environment.getExternalStorageDirectory()}")
Logger.i(TAG, "jsonFile.isFile = ${jsonFile.isFile}")
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R && Environment.isExternalStorageManager() && jsonFile.isFile) {
val jsonFileContents = jsonFile.readText()
val jsonElement = Json.parseToJsonElement(jsonFileContents)

View File

@@ -70,10 +70,10 @@ class OverlayMapActivity : AppCompatActivity() {
private lateinit var paint: Paint
@SuppressLint("DrawAllocation") // only happens once
override fun onDraw(canvas: Canvas?) {
override fun onDraw(canvas: Canvas) {
super.onDraw(canvas)
canvas?.let {
canvas.let {
if (!::paint.isInitialized) {
paint = Paint()
paint.color = Color.BLACK