Skip to content

Commit

Permalink
Upgrade Gradle version to v8.10.2 and remove jcenter repository (#963)
Browse files Browse the repository at this point in the history
* Upgrade Gradle version to v8.10.2 and remove jcenter repository

* ktlintFormat

* upgrade android gradle version

* upgrade android gradle version
  • Loading branch information
anonysoul authored Jan 17, 2025
1 parent 1f8119c commit 16ce8b5
Show file tree
Hide file tree
Showing 25 changed files with 275 additions and 205 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ insert_final_newline=true
max_line_length=120
ktlint_function_naming_ignore_when_annotated_with=Composable

[lemuroid-app/src/main/java/com/swordfish/lemuroid/app/shared/game/ShaderChooser.kt]
max_line_length = off
1 change: 0 additions & 1 deletion baselineprofile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ android {
create("bundle") { dimension = "cores" }
create("dynamic") { dimension = "cores" }
}

}

// This is the configuration block for the Baseline Profile plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.swordfish.lemuroid.baselineprofile
import androidx.benchmark.macro.junit4.BaselineProfileRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest

import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand Down Expand Up @@ -34,7 +33,6 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
@LargeTest
class BaselineProfileGenerator {

@get:Rule
val rule = BaselineProfileRule()

Expand All @@ -43,9 +41,8 @@ class BaselineProfileGenerator {
// This example works only with the variant with application id `com.swordfish.lemuroid`."
rule.collect(
packageName = "com.swordfish.lemuroid",

// See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
includeInStartupProfile = true
includeInStartupProfile = true,
) {
// This block defines the app's critical user journey. Here we are interested in
// optimizing for app startup. But you can also navigate and scroll through your most important UI.
Expand All @@ -64,4 +61,4 @@ class BaselineProfileGenerator {
// https://d.android.com/training/testing/other-components/ui-automator
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.benchmark.macro.StartupTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest

import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand Down Expand Up @@ -35,17 +34,14 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
@LargeTest
class StartupBenchmarks {

@get:Rule
val rule = MacrobenchmarkRule()

@Test
fun startupCompilationNone() =
benchmark(CompilationMode.None())
fun startupCompilationNone() = benchmark(CompilationMode.None())

@Test
fun startupCompilationBaselineProfiles() =
benchmark(CompilationMode.Partial(BaselineProfileMode.Require))
fun startupCompilationBaselineProfiles() = benchmark(CompilationMode.Partial(BaselineProfileMode.Require))

private fun benchmark(compilationMode: CompilationMode) {
// This example works only with the variant with application id `com.swordfish.lemuroid`."
Expand All @@ -69,7 +65,7 @@ class StartupBenchmarks {
// Check the UiAutomator documentation for more information on how to
// interact with the app.
// https://d.android.com/training/testing/other-components/ui-automator
}
},
)
}
}
}
13 changes: 6 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import com.android.build.gradle.BaseExtension
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
Expand All @@ -13,24 +12,24 @@ buildscript {
}
}

plugins {
plugins {
id("org.jetbrains.kotlin.jvm") version deps.versions.kotlin
id("com.github.ben-manes.versions") version "0.39.0"
id("com.github.ben-manes.versions") version "0.51.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.4.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
id("com.android.test") version "8.4.0" apply false
id("com.android.test") version "8.7.1" apply false
id("org.jetbrains.kotlin.android") version deps.versions.kotlin apply false
id("androidx.baselineprofile") version "1.2.3" apply false
id("androidx.baselineprofile") version "1.2.4" apply false
id("com.android.application") version "8.4.0" apply false
}

allprojects {
repositories {
google()
mavenCentral()
jcenter()
mavenLocal()
maven { setUrl("https://repo.huaweicloud.com/repository/maven/") }
maven { setUrl("https://jitpack.io") }
mavenLocal()
}

configurations.all {
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
repositories {
jcenter()
google()
mavenCentral()
}

plugins {
Expand Down
Empty file removed buildSrc/settings.gradle.kts
Empty file.
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ object deps {
const val harmony = "com.frybits.harmony:harmony:1.1.9"
const val startup = "androidx.startup:startup-runtime:1.1.1"
const val composeHtmlText = "de.charlex.compose.material3:material3-html-text:2.0.0-beta01"
const val radialgamepad = "com.github.Swordfish90:RadialGamePad:${versions.radialgamepad}"
const val libretrodroid = "com.github.Swordfish90:LibretroDroid:${versions.libretrodroid}"
const val radialgamepad = "com.github.swordfish90:radialgamepad:${versions.radialgamepad}"
const val libretrodroid = "com.github.swordfish90:libretrodroid:${versions.libretrodroid}"
}

object plugins {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu May 09 21:09:06 CEST 2024
#Tue Oct 29 12:03:14 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 16ce8b5

Please sign in to comment.