Skip to content

fix: set explicit namespace for AGP compatibility #600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions workmanager/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,50 +1,42 @@
group 'dev.fluttercommunity.workmanager'
version '1.0-SNAPSHOT'

rootProject.allprojects {
repositories {
mavenCentral()
google()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'dev.fluttercommunity.workmanager'
}
namespace 'dev.fluttercommunity.workmanager' // ✅ Zorunlu AGP 8+ için

compileSdk 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
compileSdk 34
minSdkVersion 19
minSdk 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
lintOptions {
disable 'InvalidPackage'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions.jvmTarget = "1.8"
}
jvmTarget = '1.8'
}

lint {
disable 'InvalidPackage'
checkReleaseBuilds false
}
}

dependencies {
def work_version = "2.9.0"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.concurrent:concurrent-futures:1.1.0"

testImplementation 'junit:junit:4.13.2'
}