diff --git a/AutoViewPager/build.gradle b/AutoViewPager/build.gradle
index d98773d482a1fe880892a1625b8267b8deb35345..a08b2d64cac321658daf04304380d95dbbb34a95 100644
--- a/AutoViewPager/build.gradle
+++ b/AutoViewPager/build.gradle
@@ -4,12 +4,11 @@ plugins {
android {
namespace 'com.ggz.autoviewpager'
- compileSdk 31
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdk 24
- targetSdk 31
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
diff --git a/H264/build.gradle b/H264/build.gradle
index ffc66371710ef1946bf1fa0752ba708bdfe936b0..cee5eeb2433f8bf5acbaa404c7050c0ae48ea3b7 100644
--- a/H264/build.gradle
+++ b/H264/build.gradle
@@ -4,15 +4,14 @@ plugins {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
- versionCode 1
- versionName "1.0"
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+ versionCode rootProject.ext.android.versionCode
+ versionName rootProject.ext.android.versionName
}
buildTypes {
@@ -34,7 +33,7 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation "androidx.appcompat:appcompat:$appcompat"
implementation 'com.google.android.material:material:1.4.0'
diff --git a/JsonViewer/build.gradle b/JsonViewer/build.gradle
index 13c42b5e192bddf608905e3df575e900ed80ee9e..ade2f69a44fc423dac79557b3c567ccec7f8b8f6 100644
--- a/JsonViewer/build.gradle
+++ b/JsonViewer/build.gradle
@@ -4,12 +4,10 @@ plugins {
}
android {
- compileSdk 30
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdk 24
- targetSdk 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
@@ -31,7 +29,7 @@ android {
dependencies {
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation "androidx.appcompat:appcompat:$appcompat"
implementation 'com.google.android.material:material:1.4.0'
}
diff --git a/LongImage/build.gradle b/LongImage/build.gradle
index 1ebe4faee95cbf2e27113794adaa4c030f60aca2..d10c895dfea634f21efec6d130c4b706532258a0 100644
--- a/LongImage/build.gradle
+++ b/LongImage/build.gradle
@@ -4,15 +4,12 @@ plugins {
}
android {
- compileSdk 30
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdk 23
- targetSdk 30
- versionCode 1
- versionName "1.0"
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
@@ -22,17 +19,18 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
- jvmTarget = '1.8'
+ jvmTarget = '11'
}
}
dependencies {
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation "androidx.appcompat:appcompat:$appcompat"
- implementation 'com.google.android.material:material:1.4.0'
+ implementation 'com.google.android.material:material:1.5.0'
+ testImplementation 'org.testng:testng:7.1.0'
}
\ No newline at end of file
diff --git a/LongImage/src/main/java/com/ggz/picture/LongImage.kt b/LongImage/src/main/java/com/ggz/picture/LongImage.kt
index 3c81d1372de534729d71d38bc832418f3a74e87c..6d0ab649cda066c869aebfb1674adfe84eddd091 100644
--- a/LongImage/src/main/java/com/ggz/picture/LongImage.kt
+++ b/LongImage/src/main/java/com/ggz/picture/LongImage.kt
@@ -59,7 +59,7 @@ class LongImageView : androidx.appcompat.widget.AppCompatImageView {
}
//显示区域图片
- mBitmapRegionDecoder = BitmapRegionDecoder.newInstance(longImageInput, false)
+ mBitmapRegionDecoder = BitmapRegionDecoder.newInstance(longImageInput, false)!!
var options: BitmapFactory.Options = BitmapFactory.Options()
options.inPreferredConfig = Bitmap.Config.RGB_565
var bitmap: Bitmap = mBitmapRegionDecoder.decodeRegion(
diff --git a/annotation/build.gradle b/annotation/build.gradle
index e493c42fffdc9ab79b54c37722e922f4053069df..17d99ee0b1cf04d34dede7a8ba259e9b579cbd29 100644
--- a/annotation/build.gradle
+++ b/annotation/build.gradle
@@ -3,6 +3,6 @@ plugins {
}
java {
- sourceCompatibility = JavaVersion.VERSION_1_7
- targetCompatibility = JavaVersion.VERSION_1_7
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
}
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 8278353d55f0bbd838642ce16208febc8e44b182..e1435ae643eb7d0288dacaf86146805d69bf18a9 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,15 +9,13 @@ plugins {
/*apply from '../gradlescript/config.gradle'*/
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
applicationId "com.guiguzi.androidtest"
- minSdkVersion 26
- targetSdkVersion 30
- versionCode 1
- versionName "1.0"
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ versionCode rootProject.ext.android.versionCode
+ versionName rootProject.ext.android.versionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -53,17 +51,10 @@ android {
buildFeatures {
dataBinding = true
- // viewBinding = true
compose true // 启用Jetpack Compose组件特性
}
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
composeOptions {
-// kotlinCompilerVersion kotlin_version
kotlinCompilerExtensionVersion compose_version
}
@@ -84,8 +75,6 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
- implementation project(path: ':AutoViewPager')
/*测试用的包*/
testImplementation 'junit:junit:4.13.2'
@@ -116,17 +105,18 @@ dependencies {
/*Jetpack引入包*/
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
+ implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle"
+ implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle"
- implementation 'com.google.android.material:material:1.4.0'
+ implementation "com.google.android.material:material:$material"
/***********Jetpack End*************/
implementation "androidx.activity:activity-compose:$compose_activity_version"
implementation "androidx.appcompat:appcompat:$appcompat"
- implementation 'androidx.core:core-ktx:1.6.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ /*配置kotlin版本*/
+ implementation "androidx.core:core-ktx:$core_ktx"
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
/*引入recyclerView*/
implementation "androidx.recyclerview:recyclerview:$recyclerVersion"
@@ -195,19 +185,15 @@ dependencies {
implementation "com.yuyh.json:jsonviewer:1.0.6"
kapt project(':apt')
-
+ implementation project(path: ':AutoViewPager')
implementation project(':network')
-
/*引入推送的api*/
implementation project(':pushbase:jiguangpush')
implementation project(':pushbase:mipush')
-
/*引入长图组件*/
implementation project(':LongImage')
-
/*引入JsonViewer*/
implementation project(':JsonViewer')
-
/*引入AutoViewPager*/
implementation project(':AutoViewPager')
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0a28f4217a8f66814969c7489f0671f2ac9b45e3..b66809f53ffa6c88c6ab4cb35343cabe943ac130 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -138,6 +138,8 @@
+
+
{
}
});
break;
+
+ case "Activity启动学习":
+ holder.itemView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Intent intent = new Intent();
+ if (mContext instanceof Activity) {
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
+ ComponentName componentName = new ComponentName(mContext, Sum1Activity.class);
+ intent.setComponent(componentName);
+ mContext.startActivity(intent);
+ }
+ });
+ break;
+
case "RelativeLayout学习":
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
@@ -633,7 +649,7 @@ public class MyAdapter extends RecyclerView.Adapter {
static class MyViewHolder extends RecyclerView.ViewHolder {
- TextView textView;
+ CustomTextView textView;
MyViewHolder(View itemView) {
super(itemView);
@@ -643,7 +659,7 @@ public class MyAdapter extends RecyclerView.Adapter {
static class MyViewHolderA extends RecyclerView.ViewHolder {
- TextView textView;
+ CustomTextView textView;
public MyViewHolderA(View itemView) {
super(itemView);
diff --git a/app/src/main/res/layout/layout_channel_item.xml b/app/src/main/res/layout/layout_channel_item.xml
index a2ca0062d400a8eb17ad2c1f1cb75070317698e7..db444a65f1fce562e28fb98e58d2574b6cc8a68f 100644
--- a/app/src/main/res/layout/layout_channel_item.xml
+++ b/app/src/main/res/layout/layout_channel_item.xml
@@ -1,12 +1,12 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorWhite"
+ android:orientation="horizontal">
-
+ tools:text="@string/hello_world"/>
\ No newline at end of file
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/DesignMain.java b/app/src/test/java/com/guiguzi/androidtest/designModel/DesignMain.java
new file mode 100644
index 0000000000000000000000000000000000000000..32fee0fe9d298364a2331933a638f9f2aac8644a
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/DesignMain.java
@@ -0,0 +1,4 @@
+package com.guiguzi.androidtest.designModel;
+
+public class DesignMain {
+}
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/AbsFactoryContainer.java b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/AbsFactoryContainer.java
new file mode 100644
index 0000000000000000000000000000000000000000..15f7c061de072eb82f3fa16c653aa431b57247f3
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/AbsFactoryContainer.java
@@ -0,0 +1,128 @@
+package com.guiguzi.androidtest.designModel.createModel;
+
+/**
+ * 抽象工厂方法
+ */
+public class AbsFactoryContainer {
+
+
+ public class FactoryProducer {
+ public AbstractFactory getFactory(String choice) {
+ if (choice.equalsIgnoreCase("SHAPE")) {
+ return new ShapeFactory();
+ } else if (choice.equalsIgnoreCase("COLOR")) {
+ return new ColorFactory();
+ }
+ return null;
+ }
+ }
+
+ public abstract class AbstractFactory {
+ public abstract Color getColor(String color);
+
+ public abstract Shape getShape(String shape);
+ }
+
+ public class ShapeFactory extends AbstractFactory {
+
+ @Override
+ public Shape getShape(String shapeType) {
+ if (shapeType == null) {
+ return null;
+ }
+ if (shapeType.equalsIgnoreCase("CIRCLE")) {
+ return new Circle();
+ } else if (shapeType.equalsIgnoreCase("RECTANGLE")) {
+ return new Rectangle();
+ } else if (shapeType.equalsIgnoreCase("SQUARE")) {
+ return new Square();
+ }
+ return null;
+ }
+
+ @Override
+ public Color getColor(String color) {
+ return null;
+ }
+ }
+
+ public class ColorFactory extends AbstractFactory {
+
+ @Override
+ public Shape getShape(String shapeType) {
+ return null;
+ }
+
+ @Override
+ public Color getColor(String color) {
+ if (color == null) {
+ return null;
+ }
+ if (color.equalsIgnoreCase("RED")) {
+ return new Red();
+ } else if (color.equalsIgnoreCase("GREEN")) {
+ return new Green();
+ } else if (color.equalsIgnoreCase("BLUE")) {
+ return new Blue();
+ }
+ return null;
+ }
+ }
+
+ public interface Shape {
+ void draw();
+ }
+
+ public class Rectangle implements Shape {
+
+ @Override
+ public void draw() {
+ System.out.println("Inside Rectangle::draw() method.");
+ }
+ }
+
+ public class Square implements Shape {
+
+ @Override
+ public void draw() {
+ System.out.println("Inside Square::draw() method.");
+ }
+ }
+
+ public class Circle implements Shape {
+
+ @Override
+ public void draw() {
+ System.out.println("Inside Circle::draw() method.");
+ }
+ }
+
+ public interface Color {
+ void fill();
+ }
+
+ public class Red implements Color {
+
+ @Override
+ public void fill() {
+ System.out.println("Inside Red::fill() method.");
+ }
+ }
+
+ public class Green implements Color {
+
+ @Override
+ public void fill() {
+ System.out.println("Inside Green::fill() method.");
+ }
+ }
+
+ public class Blue implements Color {
+
+ @Override
+ public void fill() {
+ System.out.println("Inside Blue::fill() method.");
+ }
+ }
+
+}
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/BuilderContainer.java b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/BuilderContainer.java
new file mode 100644
index 0000000000000000000000000000000000000000..1a44c6d982bb12fb20df842e79a63ede6bb9973f
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/BuilderContainer.java
@@ -0,0 +1,168 @@
+package com.guiguzi.androidtest.designModel.createModel;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 建造者模式
+ */
+public class BuilderContainer {
+
+ public void test() {
+ MealBuilder mealBuilder = new MealBuilder();
+
+ Meal vegMeal = mealBuilder.prepareVegMeal();
+ System.out.println("Veg Meal");
+ vegMeal.showItems();
+ System.out.println("Total Cost: " + vegMeal.getCost());
+
+ Meal nonVegMeal = mealBuilder.prepareNonVegMeal();
+ System.out.println("\n\nNon-Veg Meal");
+ nonVegMeal.showItems();
+ System.out.println("Total Cost: " + nonVegMeal.getCost());
+ }
+
+ public class MealBuilder {
+
+ public Meal prepareVegMeal() {
+ Meal meal = new Meal();
+ meal.addItem(new VegBurger());
+ meal.addItem(new Coke());
+ return meal;
+ }
+
+ public Meal prepareNonVegMeal() {
+ Meal meal = new Meal();
+ meal.addItem(new ChickenBurger());
+ meal.addItem(new Pepsi());
+ return meal;
+ }
+ }
+
+ public interface Item {
+ public String name();
+
+ public Packing packing();
+
+ public float price();
+ }
+
+ public interface Packing {
+ public String pack();
+ }
+
+ public abstract class Burger implements Item {
+
+ @Override
+ public Packing packing() {
+ return new Wrapper();
+ }
+
+ @Override
+ public abstract float price();
+ }
+
+ public abstract class ColdDrink implements Item {
+
+ @Override
+ public Packing packing() {
+ return new Bottle();
+ }
+
+ @Override
+ public abstract float price();
+ }
+
+ public class VegBurger extends Burger {
+
+ @Override
+ public float price() {
+ return 25.0f;
+ }
+
+ @Override
+ public String name() {
+ return "Veg Burger";
+ }
+ }
+
+ public class ChickenBurger extends Burger {
+
+ @Override
+ public float price() {
+ return 50.5f;
+ }
+
+ @Override
+ public String name() {
+ return "Chicken Burger";
+ }
+ }
+
+ public class Coke extends ColdDrink {
+
+ @Override
+ public float price() {
+ return 30.0f;
+ }
+
+ @Override
+ public String name() {
+ return "Coke";
+ }
+ }
+
+ public class Pepsi extends ColdDrink {
+
+ @Override
+ public float price() {
+ return 35.0f;
+ }
+
+ @Override
+ public String name() {
+ return "Pepsi";
+ }
+ }
+
+ public class Wrapper implements Packing {
+
+ @Override
+ public String pack() {
+ return "Wrapper";
+ }
+ }
+
+ public class Bottle implements Packing {
+
+ @Override
+ public String pack() {
+ return "Bottle";
+ }
+ }
+
+ public class Meal {
+ private List- items = new ArrayList
- ();
+
+ public void addItem(Item item) {
+ items.add(item);
+ }
+
+ public float getCost() {
+ float cost = 0.0f;
+ for (Item item : items) {
+ cost += item.price();
+ }
+ return cost;
+ }
+
+ public void showItems() {
+ for (Item item : items) {
+ System.out.print("Item : " + item.name());
+ System.out.print(", Packing : " + item.packing().pack());
+ System.out.println(", Price : " + item.price());
+ }
+ }
+ }
+
+}
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/FactoryContainer.java b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/FactoryContainer.java
new file mode 100644
index 0000000000000000000000000000000000000000..757d05f662ce37284c7b219a8191b32fa4c697ce
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/FactoryContainer.java
@@ -0,0 +1,51 @@
+package com.guiguzi.androidtest.designModel.createModel;
+
+/**
+ * 工厂模式
+ * */
+public class FactoryContainer {
+
+ public class ShapeFactory {
+
+ //使用 getShape 方法获取形状类型的对象
+ public Shape getShape(String shapeType){
+ if(shapeType == null){
+ return null;
+ }
+ if(shapeType.equalsIgnoreCase("CIRCLE")){
+ return new Circle();
+ } else if(shapeType.equalsIgnoreCase("RECTANGLE")){
+ return new Rectangle();
+ } else if(shapeType.equalsIgnoreCase("SQUARE")){
+ return new Square();
+ }
+ return null;
+ }
+ }
+
+ public interface Shape {
+ void draw();
+ }
+
+ public class Rectangle implements Shape {
+ @Override
+ public void draw() {
+ System.out.println("Inside Rectangle::draw() method.");
+ }
+ }
+
+ public class Square implements Shape {
+ @Override
+ public void draw() {
+ System.out.println("Inside Square::draw() method.");
+ }
+ }
+
+ public class Circle implements Shape {
+ @Override
+ public void draw() {
+ System.out.println("Inside Circle::draw() method.");
+ }
+ }
+
+}
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/PrototypeContainer.java b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/PrototypeContainer.java
new file mode 100644
index 0000000000000000000000000000000000000000..04f59b73b1eec997879af67701e470a9260807a5
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/PrototypeContainer.java
@@ -0,0 +1,23 @@
+package com.guiguzi.androidtest.designModel.createModel;
+
+/**
+ * 原型创建模式
+ * 用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象
+ */
+public class PrototypeContainer {
+
+ public class Student {
+ private int id;
+ private String name;
+ private int score;
+
+ public Student copy() {
+ Student std = new Student();
+ std.id = this.id;
+ std.name = this.name;
+ std.score = this.score;
+ return std;
+ }
+ }
+
+}
diff --git a/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/SingletonContainer.java b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/SingletonContainer.java
new file mode 100644
index 0000000000000000000000000000000000000000..cd8bbdf581c667f182f7fad00b79bdf9159b9966
--- /dev/null
+++ b/app/src/test/java/com/guiguzi/androidtest/designModel/createModel/SingletonContainer.java
@@ -0,0 +1,52 @@
+package com.guiguzi.androidtest.designModel.createModel;
+
+/**
+ * 单例模式
+ */
+public class SingletonContainer {
+
+
+ /**
+ * 1. 双重检锁单例
+ */
+ public static class SingletonA {
+ private static volatile SingletonA mInstance;
+ private SingletonA() {
+ }
+
+ public static SingletonA getInstance() {
+ if (mInstance == null) {
+ synchronized (SingletonA.class) {
+ if (mInstance == null) {
+ mInstance = new SingletonA();
+ }
+ }
+ }
+ return mInstance;
+ }
+ }
+
+ /**
+ * 2. 枚举单例
+ * */
+ public static enum SingletonB{
+ INSTANCE;
+ }
+
+ /**
+ * 3. 静态内部类
+ * */
+ public static class SingletonC{
+
+ private SingletonC(){}
+
+ private static class Holder{
+ private static final SingletonC INSTANCE = new SingletonC();
+ }
+
+ public static SingletonC getInstance(){
+ return Holder.INSTANCE;
+ }
+ }
+
+}
diff --git a/build.gradle b/build.gradle
index ee44ef764e37c273967eb530f1bae466f8c8b940..dfab43b8cd3b6f12f1b928d5565f1eecd01bf872 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,26 +3,41 @@
buildscript {
ext {
+ /*android中基础配置*/
+ android = [
+ compileSdk : 32,
+ minSdkVersion : 26,
+ targetSdkVersion: 32,
+ versionCode : 1,
+ versionName : "1.0.0"
+ ]
+
/*gralde tool de 版本号*/
gradle_tool_version = '7.0.0'
- kotlin_version = '1.5.31'
- kotlin_gradle_version = '1.5.31'
+ core_ktx = '1.7.0'
+ kotlin_version = '1.6.10'
+ //kotlin版本
+ kotlin_gradle_version = '1.6.10'
appCompatVersion = "1.1.0"
recyclerVersion = "1.2.1"
materialVersion = "1.1.0-beta01"
navigationVersion = "2.1.0"
constraintLayoutVersion = "2.0.0-beta3"
+ material = '1.5.0'
- appcompat = "1.3.1"
+ appcompat = "1.4.1"
swiperefreshlayout = "1.1.0"
viewpager2 = '1.0.0'
+ /*jatpack版本*/
+ lifecycle = '2.4.1'
+
/*navagiton版本号*/
- navagition_version = "2.3.5"
+ navagition_version = "2.4.1"
/*compose版本号*/
- compose_version = '1.0.5'
- compose_activity_version = '1.3.1'
+ compose_version = '1.1.1'
+ compose_activity_version = '1.4.0'
data_store = '1.0.0'
@@ -31,11 +46,10 @@ buildscript {
rxjava_android = '3.0.0'
/*Gson*/
- gson = '2.8.9'
+ gson = '2.9.0'
/*kotlin*/
- kotlinx_coroutines_android = '1.5.1'
-
+ kotlinx_coroutines_android = '1.6.2'
glide = '4.12.0'
eventbus = '3.3.1'
@@ -66,8 +80,6 @@ buildscript {
classpath "com.android.tools.build:gradle:$gradle_tool_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_gradle_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navagition_version"
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
classpath "org.aspectj:aspectjtools:$aspectj"
classpath "org.aspectj:aspectjweaver:$aspectj"
diff --git a/code_h264/build.gradle b/code_h264/build.gradle
index 628b0226e1ed4ba6d6c668f947d70e9ea3852689..01f9a53ec106599d1e275cce2e4a8376f7993338 100644
--- a/code_h264/build.gradle
+++ b/code_h264/build.gradle
@@ -4,13 +4,10 @@ plugins {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
@@ -22,18 +19,18 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
- jvmTarget = '1.8'
+ jvmTarget = '11'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation "androidx.appcompat:appcompat:$appcompat"
implementation 'com.google.android.material:material:1.4.0'
diff --git a/network/build.gradle b/network/build.gradle
index ed962d230e2560d15f811e9508c29583ab6fef2f..7e78435b03e922231f8a4d39cb8dca9c4aa96f57 100644
--- a/network/build.gradle
+++ b/network/build.gradle
@@ -2,15 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles 'consumer-rules.pro'
+ consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
@@ -26,5 +23,5 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appcompat"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
}
diff --git a/player/build.gradle b/player/build.gradle
index d10d648e6a9769aebfe975ad1d94fe5649e5a80a..4738e7af62425d8fb5dbbc5ac7b3bc12aa3624bd 100644
--- a/player/build.gradle
+++ b/player/build.gradle
@@ -4,12 +4,10 @@ plugins {
}
android {
- compileSdk 31
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdk 26
- targetSdk 31
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
@@ -21,8 +19,8 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '1.8'
@@ -31,7 +29,7 @@ android {
dependencies {
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.13.2'
diff --git a/pushbase/jiguangpush/build.gradle b/pushbase/jiguangpush/build.gradle
index 9449eb015accf514e8cb76f5ceff1f3dd09699e1..75011d0aa1cfcceae69444100f80e00df5b1653d 100644
--- a/pushbase/jiguangpush/build.gradle
+++ b/pushbase/jiguangpush/build.gradle
@@ -8,13 +8,11 @@ plugins {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.2"
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
@@ -51,7 +49,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation "androidx.appcompat:appcompat:$appcompat"
implementation 'com.google.android.material:material:1.4.0'
}
\ No newline at end of file
diff --git a/pushbase/jiguangpush/src/main/AndroidManifest.xml b/pushbase/jiguangpush/src/main/AndroidManifest.xml
index 064ba64876037aa32094d29dc13c61483758e5f2..97838142663844d12f8adf1b100ba82ce39765de 100644
--- a/pushbase/jiguangpush/src/main/AndroidManifest.xml
+++ b/pushbase/jiguangpush/src/main/AndroidManifest.xml
@@ -1,50 +1,50 @@
+ xmlns:tools="http://schemas.android.com/tools"
+ package="com.wzq.jiguangpush">
+ tools:ignore="ProtectedPermissions"/>
+ android:protectionLevel="signature"/>
-
+
-
-
-
+
+
+
-
+ tools:ignore="ScopedStorage"/>
+
-
-
+ tools:ignore="ProtectedPermissions"/>
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ tools:ignore="QueryAllPackagesPermission"/>
@@ -59,22 +59,22 @@
+ android:label="@string/app_name"/>
+ android:label="@string/app_name"/>
+ android:label="@string/app_name"/>
-
-
+
+
@@ -82,7 +82,7 @@
+ android:theme="@style/MyDialogStyle"/>
-
+
-
-
+
+
@@ -102,12 +102,13 @@
-
-
-
-
+
+
+
+
@@ -116,7 +117,7 @@
android:name="cn.jpush.android.service.DataProvider"
android:authorities="com.guiguzi.androidtest.DataProvider"
android:exported="false"
- android:process=":pushcore" />
+ android:process=":pushcore"/>
@@ -125,8 +126,8 @@
android:enabled="true"
android:exported="true">
-
-
+
+
@@ -139,8 +140,8 @@
android:taskAffinity="jpush.custom"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
-
-
+
+
@@ -148,60 +149,65 @@
+ android:exported="true"/>
-
-
+
+
-
-
+
+
-
-
+
+
-
+
+ android:exported="false"/>
+ android:exported="false"/>
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
@@ -212,8 +218,8 @@
android:taskAffinity="jpush.custom"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
-
-
+
+
@@ -222,19 +228,20 @@
-
+
-
+
+ android:value="${JPUSH_CHANNEL}"/>
+ android:value="${JPUSH_APPKEY}"/>
\ No newline at end of file
diff --git a/pushbase/mipush/build.gradle b/pushbase/mipush/build.gradle
index 0487997736f2724069bcf16f1ef9d9bfb3c89d52..b2d81eb51039835a58b29775ca0f03cdf11e5629 100644
--- a/pushbase/mipush/build.gradle
+++ b/pushbase/mipush/build.gradle
@@ -3,13 +3,10 @@ plugins {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
diff --git a/router/build.gradle b/router/build.gradle
index 599b184db0de7569d25eb4cb287931ab53a22952..0721d634d68432a3513e838ee2448ed194d3acce 100644
--- a/router/build.gradle
+++ b/router/build.gradle
@@ -10,15 +10,12 @@ plugins{
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
- /* applicationId "com.guiguzi.router"*/
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
@@ -28,16 +25,15 @@ android {
}
}
compileOptions {
- sourceCompatibility "1.8"
- targetCompatibility "1.8"
+ sourceCompatibility "11"
+ targetCompatibility "11"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appcompat"
- implementation 'androidx.core:core-ktx:1.6.0'
+ implementation "androidx.core:core-ktx:$core_ktx"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
}
diff --git a/util/build.gradle b/util/build.gradle
index 4695804557242d4249024194ac7293496b0d50e3..40254c4f758282e5887ddb3007242ac354c5ab2b 100644
--- a/util/build.gradle
+++ b/util/build.gradle
@@ -3,13 +3,10 @@ plugins {
}
android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
-
+ compileSdk rootProject.ext.android.compileSdk
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 30
-
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
@@ -21,8 +18,8 @@ android {
}
}
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
}
}