refactor(plugin): modernize plugin architecture and improve type definitions
- Update package.json with modern build tooling and dependencies - Streamline and enhance TypeScript definitions for better type safety - Reorganize plugin structure for better maintainability - Add comprehensive interface definitions for notification features - Implement proper build configuration with rollup - Update tsconfig.json for stricter type checking and ES2020 modules Breaking Changes: - Changed module structure to use ES modules - Updated interface definitions with stricter typing - Removed redundant notification options - Simplified API surface while maintaining core functionality Dependencies: - Upgrade @capacitor dependencies to v5.7.8 - Add rollup and typescript build tools - Update test framework configuration
This commit is contained in:
@@ -1,109 +1,29 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
||||
classpath 'com.android.tools.build:gradle:8.0.0'
|
||||
classpath 'com.google.gms:google-services:4.3.15'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "variables.gradle"
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
ext {
|
||||
compileSdkVersion = 33
|
||||
minSdkVersion = 21
|
||||
targetSdkVersion = 33
|
||||
buildToolsVersion = '33.0.0'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "com.timesafari.dailynotification"
|
||||
compileSdkVersion project.ext.compileSdkVersion
|
||||
buildToolsVersion project.ext.buildToolsVersion
|
||||
defaultConfig {
|
||||
minSdkVersion project.ext.minSdkVersion
|
||||
targetSdkVersion project.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:unchecked"
|
||||
options.compilerArgs << "-Xlint:deprecation"
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven {
|
||||
url "${project.rootDir}/capacitor-cordova-android-plugins/src/main/libs"
|
||||
}
|
||||
maven {
|
||||
url "${project.rootDir}/libs"
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// AndroidX Core
|
||||
implementation 'androidx.core:core:1.7.0'
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
|
||||
// WorkManager for background tasks
|
||||
implementation 'androidx.work:work-runtime:2.7.1'
|
||||
|
||||
// Capacitor dependencies
|
||||
implementation project(':capacitor-android')
|
||||
implementation project(':capacitor-core')
|
||||
|
||||
// Testing dependencies
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:4.5.1'
|
||||
testImplementation 'org.robolectric:robolectric:4.8'
|
||||
testImplementation 'androidx.test:core:1.4.0'
|
||||
testImplementation 'androidx.test:runner:1.4.0'
|
||||
testImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
|
||||
// AndroidX Test
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||
|
||||
// AndroidX AppCompat
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
|
||||
// AndroidX Core App
|
||||
implementation 'androidx.core:core-app:1.0.0'
|
||||
|
||||
// AndroidX Core AppCompat
|
||||
implementation 'androidx.core:core-appcompat:1.0.0'
|
||||
|
||||
// AndroidX Core AppCompat Resources
|
||||
implementation 'androidx.core:core-appcompat-resources:1.0.0'
|
||||
}
|
||||
Reference in New Issue
Block a user