Skip to content

Commit

Permalink
Merge pull request #113 from Banno/updates
Browse files Browse the repository at this point in the history
Update Gradle, AGP, Kotlin, etc
  • Loading branch information
joshschriever authored Feb 8, 2022
2 parents a5adfcf + 3d502ea commit 4540c40
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 31 deletions.
4 changes: 2 additions & 2 deletions gordon-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ val aapt2Version: String by project
dependencies {
implementation(gradleKotlinDsl())
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3")

implementation("com.android.tools.build:gradle:$androidGradlePluginVersion")
implementation("com.android.tools.build:bundletool:1.8.1")
implementation("com.android.tools.build:bundletool:1.8.2")
implementation("com.google.guava:guava:30.1.1-jre")
implementation("org.smali:dexlib2:2.5.2")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import org.gradle.api.provider.Provider
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.register
import java.util.Locale

class GordonPlugin : Plugin<Project> {

Expand All @@ -32,7 +33,7 @@ class GordonPlugin : Plugin<Project> {
configuration: (GordonTestTask) -> Unit
) {
val variantTaskName = androidTestVariant.name
.capitalize()
.capitalize(Locale.ROOT)
.replace(Regex("AndroidTest$"), "")
.replace(Regex("Debug$"), "")

Expand Down Expand Up @@ -124,7 +125,7 @@ class GordonPlugin : Plugin<Project> {
val testedVariant = testedExtension.testVariants.single { it.name == androidTestVariant.name }.testedVariant as ApkVariant

val (appProject, appVariant) = appDependencyOfFeature(project, testedVariant)
gordonTask.dependsOn(appProject.tasks.named("bundle${appVariant.name.capitalize()}"))
gordonTask.dependsOn(appProject.tasks.named("bundle${appVariant.name.capitalize(Locale.ROOT)}"))
val applicationAab = appVariant.aabOutputFile(appProject)
val applicationSigningConfig = appVariant.signingConfig

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
androidGradlePluginVersion=7.0.2
aapt2Version=7.0.2-7396180
kotlinVersion=1.5.21
kotlinterVersion=3.6.0
gradlePluginPublishVersion=0.16.0
androidGradlePluginVersion=7.1.1
aapt2Version=7.1.1-7984345
kotlinVersion=1.6.10
kotlinterVersion=3.8.0
gradlePluginPublishVersion=0.20.0
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx1536m
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
11 changes: 3 additions & 8 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@ pluginManagement {
kotlin("android") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("org.jmailen.kotlinter") version kotlinterVersion
id("com.android.application") version androidGradlePluginVersion
id("com.android.library") version androidGradlePluginVersion
id("com.android.dynamic-feature") version androidGradlePluginVersion
id("com.gradle.plugin-publish") version gradlePluginPublishVersion
}

resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android") {
useModule("com.android.tools.build:gradle:$androidGradlePluginVersion")
}
}
}
}
8 changes: 4 additions & 4 deletions test_app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
}

android {
compileSdk = 30
buildToolsVersion = "30.0.3"
compileSdk = 31
buildToolsVersion = "31.0.0"
defaultConfig {
minSdk = 21
targetSdk = 30
targetSdk = 31
applicationId = "com.banno.android.gordontest"
versionCode = 1
versionName = "1.0"
Expand All @@ -36,6 +36,6 @@ repositories {
}

dependencies {
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("androidx.appcompat:appcompat:1.4.1")
androidTestImplementation("androidx.test:runner:1.4.0")
}
5 changes: 3 additions & 2 deletions test_app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
package="com.banno.android.gordontest">

<application
android:allowBackup="false"
android:icon="@android:mipmap/sym_def_app_icon"
android:label="GordonTest"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar">

<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
6 changes: 3 additions & 3 deletions test_feature/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ plugins {
}

android {
compileSdk = 30
buildToolsVersion = "30.0.3"
compileSdk = 31
buildToolsVersion = "31.0.0"
defaultConfig {
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -21,6 +21,6 @@ repositories {

dependencies {
implementation(project(":test_app"))
implementation("androidx.fragment:fragment-ktx:1.3.6")
implementation("androidx.fragment:fragment-ktx:1.4.1")
androidTestImplementation("androidx.test:runner:1.4.0")
}
8 changes: 4 additions & 4 deletions test_library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ plugins {
}

android {
compileSdk = 30
buildToolsVersion = "30.0.3"
compileSdk = 31
buildToolsVersion = "31.0.0"
defaultConfig {
minSdk = 21
targetSdk = 30
targetSdk = 31
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
flavorDimensions.add("foo")
Expand All @@ -31,6 +31,6 @@ repositories {
}

dependencies {
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("androidx.appcompat:appcompat:1.4.1")
androidTestImplementation("androidx.test:runner:1.4.0")
}

0 comments on commit 4540c40

Please sign in to comment.