Skip to content

Commit

Permalink
Feat(Build): move to AGP 8.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz committed Dec 4, 2024
1 parent fa7210e commit 4bd420d
Show file tree
Hide file tree
Showing 30 changed files with 118 additions and 105 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
classpath 'com.google.gms:google-services:4.4.2'
}
Expand Down
6 changes: 3 additions & 3 deletions example_java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
checkReleaseBuilds false
lint {
abortOnError false
checkReleaseBuilds false
}

}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

import android.content.Context;

import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -41,12 +41,12 @@
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("org.flyve.example_java", appContext.getPackageName());
}
Expand Down
14 changes: 11 additions & 3 deletions example_kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
checkReleaseBuilds false
lint {
abortOnError false
checkReleaseBuilds false
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
*/

package org.flyve.example_kotlin
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import org.junit.Assert.*
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

Expand All @@ -36,7 +35,7 @@ import org.junit.runner.RunWith
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
@RunWith(AndroidJUnit4ClassRunner::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx4608m
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 02 16:44:40 CET 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions inventory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ android {
}
debug {
minifyEnabled false
testCoverageEnabled true
enableUnitTestCoverage true
enableAndroidTestCoverage true
}
}

buildFeatures {
viewBinding true
}
namespace 'org.flyve.inventory'
}

configurations {
Expand All @@ -37,8 +39,7 @@ dependencies {
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
testImplementation 'androidx.test:runner:1.3.0'
testImplementation 'androidx.test:runner:1.6.2' // Or latest version
testImplementation 'androidx.test:core:1.3.0'

implementation 'com.orhanobut:logger:2.2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@

import android.content.Context;

import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Battery;
import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.assertNotEquals;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class BatteryTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getTechnology() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
import android.content.Context;


import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Bios;

import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class BiosTest {
private Context appContext = InstrumentationRegistry.getTargetContext();
private Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();;

@Test
public void getAssesTag() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Bluetooth;

Expand All @@ -38,10 +38,10 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class BluetoothTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getHardware_address() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import android.content.Context;
import android.hardware.Camera;
import android.hardware.camera2.CameraCharacteristics;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Cameras;
import org.junit.Test;
Expand All @@ -40,10 +40,10 @@

import static org.junit.Assert.assertNotEquals;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class CamerasTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getResolutions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Controllers;
import org.junit.Test;
Expand All @@ -38,10 +39,10 @@

import static org.junit.Assert.assertNotEquals;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class ControllersTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getDriver() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Cpus;

Expand All @@ -38,10 +38,10 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class CpusTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getArch() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Categories;
import org.flyve.inventory.categories.Category;
Expand All @@ -42,10 +42,10 @@

import static org.junit.Assert.assertTrue;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class CreateFileTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void createXMLTest() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

import android.content.Context;
import android.os.Environment;
import androidx.test.InstrumentationRegistry;

import org.flyve.inventory.categories.Drives;

Expand All @@ -38,9 +37,11 @@

import static org.junit.Assert.assertNotEquals;

public class DrivesTest {
import androidx.test.platform.app.InstrumentationRegistry;

Context appContext = InstrumentationRegistry.getTargetContext();
public class DrivesTest {

Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

File froot = Environment.getRootDirectory();
File fexternal = Environment.getExternalStorageDirectory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

import org.flyve.inventory.categories.Hardware;

Expand All @@ -37,10 +38,10 @@

import static org.junit.Assert.assertNotEquals;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class HardwareTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getDatelastloggeduser() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import org.flyve.inventory.categories.Inputs;

import org.junit.Test;
Expand All @@ -37,10 +38,10 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class InputsTest {

Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getKeyboard() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
package org.flyve.inventory;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import android.util.Log;

import org.junit.Test;
Expand All @@ -37,9 +37,9 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

@RunWith(AndroidJUnit4.class)
@RunWith(AndroidJUnit4ClassRunner.class)
public class InventoryTaskTest {
Context appContext = InstrumentationRegistry.getTargetContext();
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

@Test
public void getJSONTest() throws Exception {
Expand Down
Loading

0 comments on commit 4bd420d

Please sign in to comment.