diff --git a/app/build.gradle b/app/build.gradle index 0e37723..dba2d6f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,6 +42,7 @@ android { dependencies { implementation project(path: ':commonLib') + implementation project(path: ':commonSPort') implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' diff --git a/app/src/main/java/com/common/commonlibtest/DemoActivity.java b/app/src/main/java/com/common/commonlibtest/DemoActivity.java index abb7c9e..ec69547 100644 --- a/app/src/main/java/com/common/commonlibtest/DemoActivity.java +++ b/app/src/main/java/com/common/commonlibtest/DemoActivity.java @@ -16,7 +16,6 @@ import com.common.commonlib.net.interceptor.CommonInterceptor; import com.common.commonlib.net.interceptor.RequestHeadInterceptor; import com.common.commonlib.net.interceptor.ResponseHeadInterceptor; import com.common.commonlib.net.manager.CommonInterceptorManager; -import com.common.commonlib.serialport.SerialPortUtil; import com.common.commonlib.utils.BaseUtils; import com.common.commonlib.utils.FTPUtils; import com.common.commonlib.utils.MMKVUtils; @@ -29,6 +28,7 @@ import com.common.commonlibtest.manager.InternetLoader; import com.common.commonlibtest.manager.LoaderType; import com.common.commonlibtest.manager.LoginLoader; import com.common.commonlibtest.viewpagerlayoutmanager.VariousRvDemoActivity; +import com.common.serialport.SerialPortUtil; import com.yinuo.commonlibtest.R; import com.yinuo.commonlibtest.databinding.ActivityMainBinding; diff --git a/commonLib/build.gradle b/commonLib/build.gradle index 9701236..be127c5 100644 --- a/commonLib/build.gradle +++ b/commonLib/build.gradle @@ -36,8 +36,6 @@ dependencies { implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' - implementation 'com.aill:AndroidSerialPort:1.0.8' - implementation 'com.airbnb.android:lottie:5.0.2' implementation(rootProject.ext.dependencies.mmkv) diff --git a/commonSPort/.gitignore b/commonSPort/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/commonSPort/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/commonSPort/build.gradle b/commonSPort/build.gradle new file mode 100644 index 0000000..c3321be --- /dev/null +++ b/commonSPort/build.gradle @@ -0,0 +1,22 @@ +apply from: "${rootProject.rootDir}/buildCommon/commonLibConfig.gradle" +project.ext.setLibDefaultConfig project + +android { + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + buildFeatures { + viewBinding true + } +} + +dependencies { + implementation 'com.aill:AndroidSerialPort:1.0.8' +} \ No newline at end of file diff --git a/commonSPort/consumer-rules.pro b/commonSPort/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/commonSPort/proguard-rules.pro b/commonSPort/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/commonSPort/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/commonSPort/src/main/AndroidManifest.xml b/commonSPort/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4d8db79 --- /dev/null +++ b/commonSPort/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/commonLib/src/main/java/com/common/commonlib/serialport/Cmd.java b/commonSPort/src/main/java/com/common/serialport/Cmd.java similarity index 73% rename from commonLib/src/main/java/com/common/commonlib/serialport/Cmd.java rename to commonSPort/src/main/java/com/common/serialport/Cmd.java index 91f3e18..a0ca366 100644 --- a/commonLib/src/main/java/com/common/commonlib/serialport/Cmd.java +++ b/commonSPort/src/main/java/com/common/serialport/Cmd.java @@ -1,4 +1,4 @@ -package com.common.commonlib.serialport; +package com.common.serialport; /** * @author by AllenJ on 2018/5/3. diff --git a/commonLib/src/main/java/com/common/commonlib/serialport/DataUtils.java b/commonSPort/src/main/java/com/common/serialport/DataUtils.java similarity index 99% rename from commonLib/src/main/java/com/common/commonlib/serialport/DataUtils.java rename to commonSPort/src/main/java/com/common/serialport/DataUtils.java index 458be46..59e897e 100644 --- a/commonLib/src/main/java/com/common/commonlib/serialport/DataUtils.java +++ b/commonSPort/src/main/java/com/common/serialport/DataUtils.java @@ -1,4 +1,4 @@ -package com.common.commonlib.serialport; +package com.common.serialport; import java.util.ArrayList; import java.util.List; diff --git a/commonLib/src/main/java/com/common/commonlib/serialport/SerialPortUtil.java b/commonSPort/src/main/java/com/common/serialport/SerialPortUtil.java similarity index 98% rename from commonLib/src/main/java/com/common/commonlib/serialport/SerialPortUtil.java rename to commonSPort/src/main/java/com/common/serialport/SerialPortUtil.java index cd4757d..d4ef653 100644 --- a/commonLib/src/main/java/com/common/commonlib/serialport/SerialPortUtil.java +++ b/commonSPort/src/main/java/com/common/serialport/SerialPortUtil.java @@ -1,4 +1,4 @@ -package com.common.commonlib.serialport; +package com.common.serialport; import android.util.Log; diff --git a/settings.gradle b/settings.gradle index 7c3de11..4dc2d95 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,3 +2,4 @@ rootProject.name = "CommonLibTest" include ':app' include ':commonLib' include ':commonbt' +include ':commonSPort'