Add plugin modules
This commit is contained in:
parent
fbb815c6f4
commit
2d184728db
1
core/shared/.gitignore
vendored
Normal file
1
core/shared/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
39
core/shared/build.gradle.kts
Normal file
39
core/shared/build.gradle.kts
Normal file
@ -0,0 +1,39 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = sdk.versions.compileSdk.get().toInt()
|
||||
|
||||
defaultConfig {
|
||||
minSdk = sdk.versions.minSdk.get().toInt()
|
||||
targetSdk = sdk.versions.targetSdk.get().toInt()
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
create("nightly") {
|
||||
initWith(getByName("release"))
|
||||
matchingFallbacks += "release"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
namespace = "de.mm20.launcher2.shared"
|
||||
}
|
||||
7
core/shared/consumer-rules.pro
Normal file
7
core/shared/consumer-rules.pro
Normal file
@ -0,0 +1,7 @@
|
||||
-keepclassmembers class de.mm20.launcher2.preferences.Settings {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
-keepclassmembers class de.mm20.launcher2.preferences.Settings$* {
|
||||
<fields>;
|
||||
}
|
||||
21
core/shared/proguard-rules.pro
vendored
Normal file
21
core/shared/proguard-rules.pro
vendored
Normal 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.kts.kts.kts.kts.
|
||||
#
|
||||
# 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
|
||||
3
core/shared/src/main/AndroidManifest.xml
Normal file
3
core/shared/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,14 @@
|
||||
package de.mm20.launcher2.provider.accounts
|
||||
|
||||
object AccountPluginContract {
|
||||
object Accounts {
|
||||
const val Id = "id"
|
||||
const val DisplayName = "display_name"
|
||||
const val Type = "type"
|
||||
}
|
||||
object AccountTypes {
|
||||
const val Id = "id"
|
||||
const val DisplayName = "display_name"
|
||||
const val SupportsMultipleAccounts = "supports_multiple_accounts"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
package de.mm20.launcher2.provider.files
|
||||
|
||||
import android.content.ContentUris
|
||||
import android.net.Uri
|
||||
|
||||
object FilePluginContract {
|
||||
object Roots {
|
||||
const val Id = "id"
|
||||
const val DisplayName = "display_name"
|
||||
const val Description = "description"
|
||||
const val Status = "status"
|
||||
const val AccountAuthority = "account_authority"
|
||||
|
||||
const val PathSegment = "roots"
|
||||
|
||||
fun getContentUri(authority: String): Uri {
|
||||
return Uri.Builder()
|
||||
.scheme("content")
|
||||
.authority(authority)
|
||||
.path(PathSegment)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
object Files {
|
||||
/**
|
||||
* The unique ID of the file.
|
||||
* Type: String
|
||||
*/
|
||||
const val Id = "id"
|
||||
|
||||
/**
|
||||
* The display name of the file.
|
||||
* Type: String
|
||||
*/
|
||||
const val DisplayName = "display_name"
|
||||
|
||||
/**
|
||||
* The MIME type of the file.
|
||||
* Type: String?
|
||||
*/
|
||||
const val MimeType = "mime_type"
|
||||
|
||||
/**
|
||||
* The size of the file in bytes.
|
||||
* Type: Long?
|
||||
*/
|
||||
const val Size = "size"
|
||||
|
||||
/**
|
||||
* The display path of the file.
|
||||
* Type: String?
|
||||
*/
|
||||
const val Path = "path"
|
||||
|
||||
const val MetaTitle = "meta_title"
|
||||
const val MetaArtist = "meta_artist"
|
||||
const val MetaAlbum = "meta_album"
|
||||
const val MetaDuration = "meta_duration"
|
||||
const val MetaYear = "meta_year"
|
||||
const val MetaWidth = "meta_width"
|
||||
const val MetaHeight = "meta_height"
|
||||
const val MetaLocation = "meta_location"
|
||||
const val MetaAppName = "meta_app_name"
|
||||
const val MetaAppPackageName = "meta_app_package_name"
|
||||
const val MetaAppMinSdkVersion = "meta_app_min_sdk_version"
|
||||
const val MetaOwner = "meta_owner"
|
||||
}
|
||||
}
|
||||
1
plugins/sdk/.gitignore
vendored
Normal file
1
plugins/sdk/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
43
plugins/sdk/build.gradle.kts
Normal file
43
plugins/sdk/build.gradle.kts
Normal file
@ -0,0 +1,43 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = sdk.versions.compileSdk.get().toInt()
|
||||
|
||||
defaultConfig {
|
||||
minSdk = sdk.versions.minSdk.get().toInt()
|
||||
targetSdk = sdk.versions.targetSdk.get().toInt()
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
create("nightly") {
|
||||
initWith(getByName("release"))
|
||||
matchingFallbacks += "release"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
namespace = "de.mm20.launcher2.shared"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core:shared"))
|
||||
}
|
||||
7
plugins/sdk/consumer-rules.pro
Normal file
7
plugins/sdk/consumer-rules.pro
Normal file
@ -0,0 +1,7 @@
|
||||
-keepclassmembers class de.mm20.launcher2.preferences.Settings {
|
||||
<fields>;
|
||||
}
|
||||
|
||||
-keepclassmembers class de.mm20.launcher2.preferences.Settings$* {
|
||||
<fields>;
|
||||
}
|
||||
21
plugins/sdk/proguard-rules.pro
vendored
Normal file
21
plugins/sdk/proguard-rules.pro
vendored
Normal 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.kts.kts.kts.kts.
|
||||
#
|
||||
# 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,17 @@
|
||||
package de.mm20.launcher2.sdk.files
|
||||
|
||||
import android.content.ContentProvider
|
||||
import android.database.Cursor
|
||||
import android.net.Uri
|
||||
|
||||
abstract class FileProvider: ContentProvider() {
|
||||
override fun query(
|
||||
uri: Uri,
|
||||
projection: Array<out String>?,
|
||||
selection: String?,
|
||||
selectionArgs: Array<out String>?,
|
||||
sortOrder: String?
|
||||
): Cursor? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
@ -253,6 +253,7 @@ include(":core:ktx")
|
||||
include(":core:i18n")
|
||||
include(":core:database")
|
||||
include(":core:permissions")
|
||||
include(":core:shared")
|
||||
|
||||
include(":data:appshortcuts")
|
||||
include(":data:customattrs")
|
||||
@ -288,3 +289,5 @@ include(":libs:ms-services")
|
||||
include(":services:global-actions")
|
||||
include(":services:widgets")
|
||||
include(":services:favorites")
|
||||
|
||||
include(":plugins:sdk")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user