Skip to content

Commit 8473a88

Browse files
committed
fix: set explicit namespace for AGP compatibility
1 parent 4ce0651 commit 8473a88

1 file changed

Lines changed: 14 additions & 22 deletions

File tree

workmanager/android/build.gradle

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,42 @@
11
group 'dev.fluttercommunity.workmanager'
22
version '1.0-SNAPSHOT'
33

4-
rootProject.allprojects {
5-
repositories {
6-
mavenCentral()
7-
google()
8-
}
9-
}
10-
114
apply plugin: 'com.android.library'
125
apply plugin: 'kotlin-android'
136

147
android {
15-
// Conditional for compatibility with AGP <4.2.
16-
if (project.android.hasProperty("namespace")) {
17-
namespace 'dev.fluttercommunity.workmanager'
18-
}
8+
namespace 'dev.fluttercommunity.workmanager' // ✅ Zorunlu AGP 8+ için
9+
10+
compileSdk 34
1911

20-
sourceSets {
21-
main.java.srcDirs += 'src/main/kotlin'
22-
}
2312
defaultConfig {
24-
compileSdk 34
25-
minSdkVersion 19
13+
minSdk 19
2614
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
consumerProguardFiles "consumer-rules.pro"
2716
}
28-
lintOptions {
29-
disable 'InvalidPackage'
17+
18+
sourceSets {
19+
main.java.srcDirs += 'src/main/kotlin'
3020
}
21+
3122
compileOptions {
3223
sourceCompatibility JavaVersion.VERSION_1_8
3324
targetCompatibility JavaVersion.VERSION_1_8
3425
}
3526

3627
kotlinOptions {
37-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
38-
kotlinOptions.jvmTarget = "1.8"
39-
}
28+
jvmTarget = '1.8'
4029
}
4130

31+
lint {
32+
disable 'InvalidPackage'
33+
checkReleaseBuilds false
34+
}
4235
}
4336

4437
dependencies {
4538
def work_version = "2.9.0"
4639
implementation "androidx.work:work-runtime:$work_version"
4740
implementation "androidx.concurrent:concurrent-futures:1.1.0"
48-
4941
testImplementation 'junit:junit:4.13.2'
5042
}

0 commit comments

Comments
 (0)