Skip to content

Commit

Permalink
chore(J21 compat): upgrade everything android
Browse files Browse the repository at this point in the history
Signed-off-by: l-1squared <30831153+l-1squared@users.noreply.github.com>
  • Loading branch information
l-1squared committed Oct 25, 2024
1 parent 003b0be commit 4cb1490
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ nexusStaging {

subprojects {
ext {
androidCompileSdkVersion = 33
androidCompileSdkVersion = 34
androidMinSdkVersion = 29
androidTargetSdkVersion = 32

Expand Down
8 changes: 5 additions & 3 deletions example-projects/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.5.2'
}
}

Expand All @@ -19,7 +19,8 @@ repositories {
}

android {
compileSdkVersion 33
compileSdkVersion 34
namespace 'jgiven.tngtech.com.jgiven_android.example'
defaultConfig {
applicationId "com.tngtech.jgiven.android.example"
minSdkVersion 29
Expand All @@ -46,8 +47,9 @@ configurations {
}

dependencies {
implementation('androidx.appcompat:appcompat:1.6.1') {
implementation('androidx.appcompat:appcompat:1.7.0') {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
Expand Down
3 changes: 1 addition & 2 deletions example-projects/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ spring-version = "5.3.39"
androidx-test-version = "1.6.1"

[libraries]
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "7.4.2"}
androidx-appcompat = {module = "androidx.appcompat:appcompat", version = "1.6.1"}
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "8.5.2"}
androidx-appcompat = {module = "androidx.appcompat:appcompat", version = "1.7.0"}
androidx-test-core = {module = "androidx.test:core", version.ref = "androidx-test-version"}
androidx-test-rules = {module = "androidx.test:rules", version.ref = "androidx-test-version"}
androidx-test-junit = {module = "androidx.test.ext:junit", version = "1.2.1"}
Expand Down
7 changes: 4 additions & 3 deletions jgiven-android-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ repositories {
apply plugin: 'com.android.application'

android {
compileSdkVersion androidCompileSdkVersion
compileSdk androidCompileSdkVersion
namespace 'jgiven.tngtech.com.jgiven_android.example'
defaultConfig {
applicationId "com.tngtech.jgiven.android.example"
minSdkVersion androidMinSdkVersion
Expand Down Expand Up @@ -47,8 +48,8 @@ configurations {
dependencies {
implementation(libs.androidx.appcompat) {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.guava', module: 'listenablefuture'
Expand All @@ -65,7 +66,7 @@ dependencies {
}

def targetDir = 'build/reports/jgiven/json'
def adb = android.getAdbExe().toString()
def adb = android.adbExecutable.toString()
def reportsDir = '/storage/emulated/0/Download/jgiven-reports'

task cleanJGivenReports(type: Delete) {
Expand Down
3 changes: 1 addition & 2 deletions jgiven-android-test/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Expand Down
3 changes: 1 addition & 2 deletions jgiven-android-test/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import jgiven.tngtech.com.jgiven_android.example.R;

public class MainActivity extends AppCompatActivity {

Expand Down
8 changes: 4 additions & 4 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ def release = System.env.RELEASE == "true"
def android = System.env.ANDROID == "true"
boolean hasAndroidSourcePath = (System.env.ANDROID_SDK_ROOT)

if ((android || release) && hasAndroidSourcePath) {
//if ((android || release) && hasAndroidSourcePath) {
include ':jgiven-android'
}
//}

if (android && !release && hasAndroidSourcePath) {
//if (android && !release && hasAndroidSourcePath) {
include ':jgiven-android-test'
}
//}

if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_19)) {
include ':jgiven-future-java-tests'
Expand Down

0 comments on commit 4cb1490

Please sign in to comment.