Commit c06b9616 authored by 王韦's avatar 王韦

[new] linttemp

parent b799da99
/build
\ No newline at end of file
apply plugin: 'groovy'
apply plugin: 'maven'
dependencies {
implementation localGroovy()
implementation gradleApi()
testImplementation group: 'junit', name: 'junit', version: '4.11'
// implementation "com.android.tools.lint:lint-api:$lintVersion"
}
uploadArchives {
repositories {
mavenDeployer {
//设置插件的GAV参数
pom.groupId = 'com.qmai.plugin.lint'
pom.version = '1.1.11'
//文件发布到下面目录
repository(url: uri('../repo'))
}
}
}
\ No newline at end of file
package com.qmai.android.plugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Copy
class QLintPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
// hoot git preCommit
// project.extensions.create("qmlint",QmLint.class)
def projectDir = project.getProjectDir().getPath()
// 删除 已经存在的hook文件
// 将项目中的文件复制到projectPath/.git/hooks/
println("--------------qLint plugin init -------------------")
println("=======${projectDir}")
// project.tasks.create("LintIncrementTask", QmLintIncrementTask.class)
File file = new File("${project.getRootDir().getAbsolutePath()}${File.separator}.git${File.separator}hooks${File.separator}pre-commit")
file.deleteOnExit()
project.tasks.create("copyGitHookFile", Copy.class) {
from("\"${project.getRootDir().getAbsolutePath()}${File.separator}githooks${File.separator}pre-commit")
into("${project.getRootDir().getAbsolutePath()}${File.separator}.git${File.separator}hooks${File.separator}pre-commit")
}
// git 获取 增量文件名list
// exe lint task
}
}
package com.qmai.android.plugin;
/**
* created by wangwei ON 6/9/20 email:wangwei_5521@163.com
*
* @version 1.1.1
* @Description
**/
class QmLint {
private String gitHookPath;
public String getGitHookPath() {
return gitHookPath;
}
public void setGitHookPath(String gitHookPath) {
this.gitHookPath = gitHookPath;
}
}
package com.qmai.android.plugin;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction;
/**
* created by wangwei ON 6/9/20 email:wangwei_5521@163.com
*
* @version 1.1.1
* @Description git hook 会执行这个task
**/
class QmLintIncrementTask extends DefaultTask {
public QmLintIncrementTask(){}
@TaskAction
public void start() {
System.out.println("--------LintIncrement执行-------");
}
}
implementation-class=com.qmai.android.plugin.QLintPlugin
\ No newline at end of file
...@@ -3,6 +3,7 @@ apply plugin: 'com.android.application' ...@@ -3,6 +3,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.qmai.plugin.lint'
android { android {
compileSdkVersion 29 compileSdkVersion 29
...@@ -13,6 +14,7 @@ android { ...@@ -13,6 +14,7 @@ android {
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
release { release {
...@@ -24,10 +26,11 @@ android { ...@@ -24,10 +26,11 @@ android {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2' implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation project(path: ':qmaiLintAar')
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
...@@ -37,4 +40,8 @@ dependencies { ...@@ -37,4 +40,8 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0'
// todo test
// implementation 'com.android.tools.build:gradle:3.1.1'
// implementation 'com.android.tools.lint:lint-gradle:26.1.1'
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity android:name=".GridDividerActivity"></activity> <activity android:name=".GridDividerActivity"/>
<activity android:name=".TipActivity" /> <activity android:name=".TipActivity" />
<activity android:name=".CommomPopActivity" /> <activity android:name=".CommomPopActivity" />
<activity android:name=".TopBarActivity" /> <activity android:name=".TopBarActivity" />
......
...@@ -33,7 +33,7 @@ class GridDividerActivity : AppCompatActivity() { ...@@ -33,7 +33,7 @@ class GridDividerActivity : AppCompatActivity() {
class GridAdatper(var datas: MutableList<String>) : RecyclerView.Adapter<GridViewHolder>() { class GridAdatper(var datas: MutableList<String>) : RecyclerView.Adapter<GridViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GridViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GridViewHolder {
val itemview = val itemview =
LayoutInflater.from(parent.context).inflate(R.layout.grid_item, parent, false); LayoutInflater.from(parent.context).inflate(R.layout.grid_item, parent, false)
return GridViewHolder(itemView = itemview) return GridViewHolder(itemView = itemview)
} }
...@@ -50,7 +50,7 @@ class GridAdatper(var datas: MutableList<String>) : RecyclerView.Adapter<GridVie ...@@ -50,7 +50,7 @@ class GridAdatper(var datas: MutableList<String>) : RecyclerView.Adapter<GridVie
class GridViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { class GridViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val conent = itemView.findViewById<TextView>(R.id.conent) val conent: TextView = itemView.findViewById<TextView>(R.id.conent)
} }
...@@ -3,8 +3,8 @@ package com.qimai.android.widget ...@@ -3,8 +3,8 @@ package com.qimai.android.widget
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.widget.Button import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import com.qimai.android.widgetlib.toast.CustomToastUtils
import com.qimai.android.widgetlib.toast.HolderContext import com.qimai.android.widgetlib.toast.HolderContext
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
...@@ -13,8 +13,9 @@ class MainActivity : AppCompatActivity() { ...@@ -13,8 +13,9 @@ class MainActivity : AppCompatActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main) setContentView(R.layout.activity_main)
HolderContext.getInstance().register { HolderContext.getInstance().register {
MainActivity@ this this
} }
supportFragmentManager
findViewById<Button>(R.id.commonPop).setOnClickListener { findViewById<Button>(R.id.commonPop).setOnClickListener {
// ToastUtils.getInstance().showCenter("测试测试") // ToastUtils.getInstance().showCenter("测试测试")
...@@ -25,8 +26,9 @@ class MainActivity : AppCompatActivity() { ...@@ -25,8 +26,9 @@ class MainActivity : AppCompatActivity() {
// val loding = Loading() // val loding = Loading()
// loding.isCancelable =false // loding.isCancelable =false
// loding.show(supportFragmentManager, "loading") // loding.show(supportFragmentManager, "loading")
Toast.makeText(this, "", Toast.LENGTH_SHORT);
TestWindow(this, findViewById<Button>(R.id.commonPop)).build().show() // TestWindow(this, findViewById<Button>(R.id.commonPop)).build().show()
// CustomToastUtils.getInstance().success() // CustomToastUtils.getInstance().success()
} }
......
package com.qimai.android.widget;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
import androidx.annotation.Nullable;
class Test extends Activity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Toast.makeText(this, "",Toast.LENGTH_LONG).show();
}
}
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:id="@+id/root" android:id="@+id/root"
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.60' ext.kotlin_version = '1.3.60'
ext.lintVersion = '26.5.0'
repositories { repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }// 阿里云镜像 maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }// 阿里云镜像
...@@ -15,14 +16,17 @@ buildscript { ...@@ -15,14 +16,17 @@ buildscript {
maven { maven {
url "https://plugins.gradle.org/m2/" url "https://plugins.gradle.org/m2/"
} }
maven {
url uri('repo/')
}
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:3.6.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath "com.whl:gradle-publish-plugin:0.1.16-SNAPSHOT" classpath "com.whl:gradle-publish-plugin:0.1.16-SNAPSHOT"
classpath "com.qmai.plugin.lint:LintPlugin:1.1.11"
} }
...@@ -44,7 +48,9 @@ allprojects { ...@@ -44,7 +48,9 @@ allprojects {
maven { maven {
url "https://plugins.gradle.org/m2/" url "https://plugins.gradle.org/m2/"
} }
maven {
url uri('repo/')
}
} }
} }
......
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
compile "androidx.core:core-ktx:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
package com.qmai.android.fragmentcontroller;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.qmai.android.fragmentcontroller.test", appContext.getPackageName());
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qmai.android.fragmentcontroller" />
package com.qmai.android.fragmentcontroller
import android.content.Context
import android.os.Bundle
import android.util.AttributeSet
import android.view.View
import androidx.fragment.app.Fragment
/**
* created by wangwei ON 2019-10-29 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class LifeFragment :Fragment(){
override fun onAttach(context: Context) {
super.onAttach(context)
}
override fun onDestroy() {
super.onDestroy()
}
override fun onInflate(context: Context, attrs: AttributeSet, savedInstanceState: Bundle?) {
super.onInflate(context, attrs, savedInstanceState)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
}
}
\ No newline at end of file
<resources>
<string name="app_name">FragmentController</string>
</resources>
package com.qmai.android.fragmentcontroller;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
#!/bin/sh
# shellcheck disable=SC1073
lint(){
echo "开始执行 增量lint检查"
./gradlew task incrementLint
}
lint
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html # http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
...@@ -29,3 +29,4 @@ RELEASE_REPOSITORY_URL=https://hub.zmcms.cn/repository/maven-releases/ ...@@ -29,3 +29,4 @@ RELEASE_REPOSITORY_URL=https://hub.zmcms.cn/repository/maven-releases/
PUBLIC_REPOSITORY_URL=https://hub.zmcms.cn/repository/maven-public/ PUBLIC_REPOSITORY_URL=https://hub.zmcms.cn/repository/maven-public/
NEXUS_USERNAME=wangwei NEXUS_USERNAME=wangwei
NEXUS_PASSWORD=caihong520 NEXUS_PASSWORD=caihong520
#Wed Aug 28 09:07:20 CST 2019 #Thu May 14 14:45:30 CST 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
/build
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
configurations {
lintJarOutput
}
dependencies {
lintPublish project(':qmaiLintRules')
}
\ No newline at end of file
package com.qmai.android.qmailintaar
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.qmai.android.qmailintaar.test", appContext.packageName)
}
}
\ No newline at end of file
<manifest package="com.qmai.android.qmailintaar">
/
</manifest>
\ No newline at end of file
/build
\ No newline at end of file
apply plugin: 'java-library'
apply plugin: 'kotlin'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compileOnly "com.android.tools.lint:lint-api:$lintVersion"
compileOnly "com.android.tools.lint:lint-checks:$lintVersion"
testImplementation "junit:junit:4.12"
implementation "com.android.tools.lint:lint:$lintVersion"
testImplementation "com.android.tools.lint:lint-tests:$lintVersion"
testImplementation "com.android.tools:testutils:$lintVersion"
}
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
jar {
manifest {
// Only use the "-v2" key here if your checks have been updated to the
// new 3.0 APIs (including UAST)
attributes("Lint-Registry-v2": "com.qmai.android.qmailintrules.QmBuildIssueRegistry")
}
}
package com.qmai.android.qmailintrules
import com.android.tools.lint.client.api.IssueRegistry
import com.android.tools.lint.detector.api.Issue
/**
* created by wangwei ON 6/5/20 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class QmBuildIssueRegistry : IssueRegistry() {
override val issues: List<Issue>
get() = listOf(
QmToastDetector.TOAST_ISSUE
)
}
\ No newline at end of file
package com.qmai.android.qmailintrules
import com.android.tools.lint.detector.api.*
import com.intellij.psi.PsiMethod
import org.jetbrains.uast.UCallExpression
/**
* created by wangwei ON 6/5/20 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class QmToastDetector : Detector(), SourceCodeScanner {
companion object Issue {
@JvmField
val TOAST_ISSUE = com.android.tools.lint.detector.api.Issue.create(
id = "QmToastCheck",
briefDescription = "qmToast",
explanation = "请使用qimaitoast",
category = Category.USABILITY,
priority = 6,
severity = Severity.WARNING,
implementation = Implementation(
QmToastDetector::class.java, Scope.JAVA_FILE_SCOPE
)
).setAndroidSpecific(true)
}
override fun getApplicableMethodNames(): List<String>? {
return listOf("makeText")
}
override fun visitMethodCall(context: JavaContext, node: UCallExpression, method: PsiMethod) {
super.visitMethodCall(context, node, method)
if (!context.evaluator.isMemberInClass(method, "android.widget.Toast")) {
return
}
if (method.name == "makeText") {
context.report(QmToastDetector.TOAST_ISSUE, node, context.getLocation(node), "toast使用问题")
}
}
}
\ No newline at end of file
package com.qmai.android.qmailintaar
import com.android.tools.lint.checks.ToastDetector
import com.android.tools.lint.checks.infrastructure.LintDetectorTest
import com.android.tools.lint.detector.api.Detector
import com.android.tools.lint.detector.api.Issue
import com.qmai.android.qmailintrules.QmToastDetector
/**
* created by wangwei ON 6/8/20 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class QmToastDetectorTest : LintDetectorTest() {
override fun getDetector(): Detector {
return QmToastDetector()
}
override fun getIssues(): MutableList<Issue> {
return mutableListOf(QmToastDetector.TOAST_ISSUE)
}
fun testToast() {
lint()
.files(
java(
"""
package test.pkg;
public class TestClass1 {
fun toast(){
}
}
"""
).indented()
).run()
.expect(
"""
Toast问题
"""
)
}
}
\ No newline at end of file
include ':app', ':widgetlib', ':tools', ':fragmentcontroller', ':smallwidget', ':usefulltool' include ':LintPlugin'
include ':qmaiLintAar'
include ':qmaiLintRules'
include ':app', ':widgetlib', ':tools', ':smallwidget', ':usefulltool'
...@@ -27,7 +27,7 @@ android { ...@@ -27,7 +27,7 @@ android {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0' implementation 'androidx.core:core-ktx:1.1.0'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest
package="com.qmai.android.samllwidget" /> package="com.qmai.android.samllwidget" />
...@@ -34,7 +34,7 @@ dependencies { ...@@ -34,7 +34,7 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.core:core-ktx:1.0.2" implementation "androidx.core:core-ktx:1.0.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest package="com.qimai.android.tools" />
package="com.qimai.android.tools"/>
...@@ -27,7 +27,7 @@ android { ...@@ -27,7 +27,7 @@ android {
dependencies { dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0' implementation 'androidx.core:core-ktx:1.1.0'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest package="com.qmai.android.usefulltool" />
package="com.qmai.android.usefulltool" />
...@@ -30,11 +30,12 @@ dependencies { ...@@ -30,11 +30,12 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.core:core-ktx:1.0.2" implementation "androidx.core:core-ktx:1.0.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation project(path: ':tools') implementation project(path: ':tools')
implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.github.ybq:Android-SpinKit:1.4.0' implementation 'com.github.ybq:Android-SpinKit:1.4.0'
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest package="com.qimai.android.widgetlib" />
package="com.qimai.android.widgetlib"/>
<resources> <resources>
<string name="QmTopBar_app_name">widgetLib</string> <string name="QmTopBar_app_name">widgetLib</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment