feat: photo project.

This commit is contained in:
cgspine
2022-01-13 13:33:56 +08:00
parent 950af79fc4
commit 08b81e9253
10 changed files with 135 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
/build
+53
View File
@@ -0,0 +1,53 @@
import com.qmuiteam.plugin.Dep
plugins {
id("com.android.library")
kotlin("android")
`maven-publish`
id("qmui-publish")
}
version = Dep.QMUI.photoVer
android {
compileSdk = Dep.compileSdk
defaultConfig {
minSdk = Dep.minSdk
targetSdk = Dep.targetSdk
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = Dep.Compose.version
}
buildTypes {
getByName("release"){
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = Dep.javaVersion
targetCompatibility = Dep.javaVersion
}
kotlinOptions {
jvmTarget = Dep.kotlinJvmTarget
}
}
dependencies {
api(Dep.AndroidX.annotation)
api(Dep.AndroidX.coreKtx)
api(Dep.AndroidX.appcompat)
api(Dep.Compose.ui)
api(Dep.Compose.animation)
api(Dep.Compose.material)
api(Dep.Compose.compiler)
}
View File
+21
View File
@@ -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
@@ -0,0 +1,24 @@
package com.qmuiteam
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.qmuiteam.test", appContext.packageName)
}
}
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qmuiteam.photo">
</manifest>
@@ -0,0 +1,12 @@
package com.qmuiteam.photo.activity
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.ViewModel
class ImageViewerViewModel: ViewModel(){
}
class QMUIImageViewerActivity: AppCompatActivity() {
}
@@ -0,0 +1,17 @@
package com.qmuiteam
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
@@ -17,6 +17,7 @@ object Dep {
const val archVer = "2.0.1"
const val typeVer = "0.0.14"
const val composeVer = "0.0.1"
const val photoVer = "0.0.1"
}
object AndroidX {
+1
View File
@@ -7,6 +7,7 @@ include(":arch-compiler")
include(":arch-annotation")
include(":type")
include(":compose")
include(":photo")
includeBuild("./plugin")