mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-18 13:11:05 +08:00
remove skin maker code and update gradle
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
api "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
api "androidx.fragment:fragment:1.3.0"
|
||||
api "androidx.fragment:fragment:1.3.6"
|
||||
|
||||
api project(':arch-annotation')
|
||||
compileOnly project(':qmui')
|
||||
|
||||
+8
-9
@@ -1,15 +1,14 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.4.30'
|
||||
ext.kotlin_version = '1.5.21'
|
||||
repositories {
|
||||
mavenLocal()
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
// classpath 'com.qmuiteam:skin-maker-plugin:0.0.1'
|
||||
}
|
||||
@@ -21,7 +20,7 @@ subprojects { project ->
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
}
|
||||
@@ -30,10 +29,10 @@ allprojects {
|
||||
minSdkVersion = 21
|
||||
targetSdkVersion = 30
|
||||
compileSdkVersion = 30
|
||||
coreVersion='1.5.0-beta01'
|
||||
appcompatVersion= '1.3.0-beta01'
|
||||
materialVersion='1.3.0'
|
||||
annotationVersion='1.2.0-beta01'
|
||||
coreVersion='1.6.0'
|
||||
appcompatVersion= '1.3.1'
|
||||
materialVersion='1.4.0'
|
||||
annotationVersion='1.2.0'
|
||||
butterknifeVersion = '10.1.0'
|
||||
constraintLayoutVersion = "2.0.4"
|
||||
mmkvVersion = '1.0.23'
|
||||
|
||||
+3
-3
@@ -22,10 +22,10 @@ android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
GROUP=com.qmuiteam
|
||||
QMUI_VERSION=2.0.0-alpha12
|
||||
QMUI_ARCH_VERSION=2.0.0-alpha12
|
||||
QMUI_VERSION=2.0.0-alpha13
|
||||
QMUI_ARCH_VERSION=2.0.0-alpha13
|
||||
QMUI_LINT_VERSION = 1.1.0
|
||||
QMUI_SKIN_MAKER_VERSION = 0.0.1
|
||||
QMUI_TYPE_VERSION = 0.0.7
|
||||
QMUI_TYPE_VERSION = 0.0.13
|
||||
POM_GIT_URL=https://github.com/Tencent/QMUI_Android/
|
||||
POM_SITE_URL=https://qmuiteam.com/android
|
||||
@@ -1,5 +1,4 @@
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
Properties properties = new Properties()
|
||||
File projectPropertiesFile = rootProject.file("gradle/deploy.properties")
|
||||
@@ -132,17 +131,3 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = properties.getProperty("bintray.user")
|
||||
key = properties.getProperty("bintray.apikey")
|
||||
publications = ['mavenjava']
|
||||
pkg {
|
||||
repo = 'qmuirepo'
|
||||
name = project.name
|
||||
websiteUrl =POM_SITE_URL
|
||||
vcsUrl = POM_GIT_URL
|
||||
licenses = ["MIT"]
|
||||
publish = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-10
@@ -64,14 +64,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//apply plugin: 'com.qmuiteam.qmui.skinMaker'
|
||||
//skinMaker{
|
||||
// file rootProject.file('qmuidemo-skin-code-generator-source')
|
||||
//}
|
||||
|
||||
|
||||
|
||||
// 加@aar与不加@aar的区别:
|
||||
// http://stackoverflow.com/questions/30157575/why-should-i-include-a-gradle-dependency-as-aar
|
||||
dependencies {
|
||||
@@ -92,14 +84,13 @@ dependencies {
|
||||
implementation project(':type')
|
||||
kapt project(':compiler')
|
||||
kapt project(':arch-compiler')
|
||||
implementation project(":skin-maker")
|
||||
|
||||
//leak
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
|
||||
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
//test
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
// androidTestImplementation 'com.android.support.test:rules:1.0.2' // Set this dependency to use JUnit 4 rules
|
||||
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' // Set this dependency to build and run Espresso tests
|
||||
|
||||
@@ -27,7 +27,6 @@ import androidx.annotation.NonNull;
|
||||
import com.qmuiteam.qmui.QMUILog;
|
||||
import com.qmuiteam.qmui.arch.QMUISwipeBackActivityManager;
|
||||
import com.qmuiteam.qmui.qqface.QMUIQQFaceCompiler;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinMaker;
|
||||
import com.qmuiteam.qmuidemo.manager.QDSkinManager;
|
||||
import com.qmuiteam.qmuidemo.manager.QDUpgradeManager;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
@@ -38,8 +37,6 @@ import com.squareup.leakcanary.LeakCanary;
|
||||
*/
|
||||
public class QDApplication extends Application {
|
||||
|
||||
public static boolean openSkinMake = false;
|
||||
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private static Context context;
|
||||
|
||||
@@ -87,9 +84,6 @@ public class QDApplication extends Application {
|
||||
QMUISwipeBackActivityManager.init(this);
|
||||
QMUIQQFaceCompiler.setDefaultQQFaceManager(QDQQFaceManager.getInstance());
|
||||
QDSkinManager.install(this);
|
||||
QMUISkinMaker.init(context,
|
||||
new String[]{"com.qmuiteam.qmuidemo"},
|
||||
new String[]{"app_skin_"}, R.attr.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package com.qmuiteam.qmuidemo;
|
||||
|
||||
import static com.qmuiteam.qmuidemo.fragment.QDWebExplorerFragment.EXTRA_TITLE;
|
||||
import static com.qmuiteam.qmuidemo.fragment.QDWebExplorerFragment.EXTRA_URL;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@@ -33,7 +36,6 @@ import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentContainerView;
|
||||
|
||||
import com.qmuiteam.qmui.arch.QMUIFragment;
|
||||
@@ -42,7 +44,6 @@ import com.qmuiteam.qmui.arch.annotation.DefaultFirstFragment;
|
||||
import com.qmuiteam.qmui.arch.annotation.FirstFragments;
|
||||
import com.qmuiteam.qmui.arch.annotation.LatestVisitRecord;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinHelper;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinMaker;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinManager;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinValueBuilder;
|
||||
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
|
||||
@@ -53,7 +54,6 @@ import com.qmuiteam.qmui.widget.QMUIRadiusImageView2;
|
||||
import com.qmuiteam.qmui.widget.dialog.QMUIDialog;
|
||||
import com.qmuiteam.qmui.widget.popup.QMUIPopup;
|
||||
import com.qmuiteam.qmui.widget.popup.QMUIPopups;
|
||||
import com.qmuiteam.qmuidemo.base.BaseFragment;
|
||||
import com.qmuiteam.qmuidemo.base.BaseFragmentActivity;
|
||||
import com.qmuiteam.qmuidemo.fragment.QDWebExplorerFragment;
|
||||
import com.qmuiteam.qmuidemo.fragment.components.QDPopupFragment;
|
||||
@@ -73,9 +73,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.qmuiteam.qmuidemo.fragment.QDWebExplorerFragment.EXTRA_TITLE;
|
||||
import static com.qmuiteam.qmuidemo.fragment.QDWebExplorerFragment.EXTRA_URL;
|
||||
|
||||
@FirstFragments(
|
||||
value = {
|
||||
HomeFragment.class,
|
||||
@@ -126,16 +123,7 @@ public class QDMainActivity extends BaseFragmentActivity {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
private void renderSkinMakerBtn() {
|
||||
Fragment baseFragment = getCurrentFragment();
|
||||
if (baseFragment instanceof BaseFragment) {
|
||||
if (QDApplication.openSkinMake) {
|
||||
((BaseFragment) baseFragment).openSkinMaker();
|
||||
} else {
|
||||
QMUISkinMaker.getInstance().unBindAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
@@ -148,7 +136,6 @@ public class QDMainActivity extends BaseFragmentActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
renderSkinMakerBtn();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -161,9 +148,7 @@ public class QDMainActivity extends BaseFragmentActivity {
|
||||
|
||||
private void showGlobalActionPopup(View v) {
|
||||
String[] listItems = new String[]{
|
||||
"Change Skin",
|
||||
QDApplication.openSkinMake ? "Close SkinMaker(Developing)" : "Open SkinMaker(Developing)",
|
||||
"Export SkinMaker Result"
|
||||
"Change Skin"
|
||||
};
|
||||
List<String> data = new ArrayList<>();
|
||||
|
||||
@@ -186,11 +171,6 @@ public class QDMainActivity extends BaseFragmentActivity {
|
||||
.setSkinManager(QMUISkinManager.defaultInstance(QDMainActivity.this))
|
||||
.create()
|
||||
.show();
|
||||
} else if (i == 1) {
|
||||
QDApplication.openSkinMake = !QDApplication.openSkinMake;
|
||||
renderSkinMakerBtn();
|
||||
} else if (i == 2) {
|
||||
QMUISkinMaker.getInstance().export(QDMainActivity.this);
|
||||
}
|
||||
if (mGlobalAction != null) {
|
||||
mGlobalAction.dismiss();
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.qmuiteam.qmuidemo.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
@@ -27,12 +26,10 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.qmuiteam.qmui.arch.QMUIFragment;
|
||||
import com.qmuiteam.qmui.arch.SwipeBackLayout;
|
||||
import com.qmuiteam.qmui.skin.QMUISkinMaker;
|
||||
import com.qmuiteam.qmui.util.QMUIDisplayHelper;
|
||||
import com.qmuiteam.qmui.util.QMUIViewHelper;
|
||||
import com.qmuiteam.qmui.widget.QMUITopBar;
|
||||
import com.qmuiteam.qmui.widget.QMUITopBarLayout;
|
||||
import com.qmuiteam.qmuidemo.QDApplication;
|
||||
import com.qmuiteam.qmuidemo.QDMainActivity;
|
||||
import com.qmuiteam.qmuidemo.fragment.home.HomeFragment;
|
||||
import com.qmuiteam.qmuidemo.manager.QDDataManager;
|
||||
@@ -47,36 +44,10 @@ public abstract class BaseFragment extends QMUIFragment {
|
||||
|
||||
private static final String TAG = "BaseFragment";
|
||||
|
||||
private int mBindId = -1;
|
||||
|
||||
public BaseFragment() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
if(QDApplication.openSkinMake){
|
||||
openSkinMaker();
|
||||
}
|
||||
}
|
||||
|
||||
public void openSkinMaker(){
|
||||
if(mBindId < 0){
|
||||
mBindId = QMUISkinMaker.getInstance().bind(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void closeSkinMaker(){
|
||||
QMUISkinMaker.getInstance().unBind(mBindId);
|
||||
mBindId = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
closeSkinMaker();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int backViewInitOffset(Context context, int dragDirection, int moveEdge) {
|
||||
if (moveEdge == SwipeBackLayout.EDGE_TOP || moveEdge == SwipeBackLayout.EDGE_BOTTOM) {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
include ':qmuidemo', ':qmui', ':lib', ':compiler', ':lint', ':lintrule', ':arch', ':arch-compiler',
|
||||
':arch-annotation', ':skin-maker', ':skin-maker-plugin'
|
||||
':arch-annotation'
|
||||
include ':type'
|
||||
|
||||
Reference in New Issue
Block a user