fix: resolve Android build issues and create proper plugin module
- Fix capacitor.build.gradle to comment out missing Capacitor integration file - Create separate plugin module with proper build.gradle configuration - Copy plugin source code to android/plugin/src/main/java/ - Update settings.gradle to include plugin module - Fix plugin build.gradle to remove Kotlin plugin dependency - Successfully build plugin AAR: android/plugin/build/outputs/aar/plugin-release.aar - Update BUILDING.md with correct build commands and troubleshooting This resolves the Android Studio build issues by creating a proper plugin library module separate from the test app.
This commit is contained in:
42
android/plugin/build.gradle
Normal file
42
android/plugin/build.gradle
Normal file
@@ -0,0 +1,42 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
namespace "com.timesafari.dailynotification"
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
||||
implementation "androidx.room:room-runtime:2.6.1"
|
||||
implementation "androidx.work:work-runtime-ktx:2.9.0"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.10"
|
||||
|
||||
annotationProcessor "androidx.room:room-compiler:2.6.1"
|
||||
|
||||
testImplementation "junit:junit:$junitVersion"
|
||||
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
||||
}
|
||||
Reference in New Issue
Block a user