From 3e7e4364168f397f2eea35c25f90e1beb6592cee Mon Sep 17 00:00:00 2001
From: pw <329803553@qq.com>
Date: Mon, 10 Feb 2025 22:40:56 +0800
Subject: [PATCH] Upgrade to AGP 7
---
build.gradle | 2 +-
easyble/build.gradle | 8 +++---
.../easyble/ExampleInstrumentedTest.java | 26 -------------------
.../com/ficat/easyble/ExampleUnitTest.java | 17 ------------
gradle/wrapper/gradle-wrapper.properties | 2 +-
sample/build.gradle | 6 ++---
6 files changed, 8 insertions(+), 53 deletions(-)
delete mode 100644 easyble/src/androidTest/java/com/ficat/easyble/ExampleInstrumentedTest.java
delete mode 100644 easyble/src/test/java/com/ficat/easyble/ExampleUnitTest.java
diff --git a/build.gradle b/build.gradle
index bfac85c..f8b01ce 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.2.2'
+ classpath 'com.android.tools.build:gradle:7.4.2'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/easyble/build.gradle b/easyble/build.gradle
index 5a0a350..7fedfc8 100644
--- a/easyble/build.gradle
+++ b/easyble/build.gradle
@@ -1,15 +1,13 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 34
+ compileSdk 34
defaultConfig {
- minSdkVersion 18
- targetSdkVersion 33
- versionCode 1
- versionName "1.0"
+ minSdk 18
+ targetSdk 33
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
diff --git a/easyble/src/androidTest/java/com/ficat/easyble/ExampleInstrumentedTest.java b/easyble/src/androidTest/java/com/ficat/easyble/ExampleInstrumentedTest.java
deleted file mode 100644
index 6b72948..0000000
--- a/easyble/src/androidTest/java/com/ficat/easyble/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.ficat.easyble;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getTargetContext();
-
- assertEquals("com.ficat.easyble.test", appContext.getPackageName());
- }
-}
diff --git a/easyble/src/test/java/com/ficat/easyble/ExampleUnitTest.java b/easyble/src/test/java/com/ficat/easyble/ExampleUnitTest.java
deleted file mode 100644
index c3c6bf8..0000000
--- a/easyble/src/test/java/com/ficat/easyble/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ficat.easyble;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see Testing documentation
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index f87581c..7634f3f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
diff --git a/sample/build.gradle b/sample/build.gradle
index da8b56a..054f878 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 34
+ compileSdk 34
defaultConfig {
applicationId "com.ficat.sample"
- minSdkVersion 18
- targetSdkVersion 33
+ minSdk 18
+ targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"