plugins { id 'com.android.application' id 'kotlin-android' id "com.diffplug.spotless" id "se.ascp.gradle.gradle-versions-filter" version "0.1.16" } android { compileSdk 33 defaultConfig { applicationId "net.redwarp.gifwallpaper" minSdkVersion 21 targetSdkVersion 33 versionCode 74 versionName "2.2.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" resConfigs 'en', 'fr', 'ru', 'de', 'es', 'it', 'zh', 'eu', 'tr' } buildFeatures { compose true } buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = "11" freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" } sourceSets { main { resources { srcDirs 'src/main/resources', "$rootDir/docs/" } } } testOptions { unitTests { includeAndroidResources = true } } composeOptions { kotlinCompilerExtensionVersion '1.4.0' } namespace 'net.redwarp.gifwallpaper' } spotless { kotlin { target '**/*.kt' licenseHeaderFile(new File(rootDir, 'assets/license_header.kt')) } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation(project(':markdown')) implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'androidx.core:core-ktx:1.9.0' implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' implementation 'androidx.lifecycle:lifecycle-service:2.5.1' implementation 'androidx.palette:palette-ktx:1.0.0' implementation "com.atlassian.commonmark:commonmark:0.17.0" implementation "app.redwarp.gif:decoder:1.4.4" implementation "app.redwarp.gif:android-drawable:1.4.4" implementation "androidx.datastore:datastore-preferences:1.0.0" // Integration with activities implementation 'androidx.activity:activity-compose:1.6.1' // Compose Material Design implementation "androidx.compose.material:material:1.3.1" // Animations implementation "androidx.compose.animation:animation:1.3.3" // Tooling support (Previews, etc.) implementation "androidx.compose.ui:ui-tooling:1.3.3" implementation "androidx.compose.ui:ui-tooling-preview:1.3.3" implementation "androidx.navigation:navigation-compose:2.5.3" implementation "com.google.accompanist:accompanist-systemuicontroller:0.28.0" testImplementation 'junit:junit:4.13.2' testImplementation 'org.robolectric:robolectric:4.9.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' // Test rules and transitive dependencies: androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.3.3") // Needed for createComposeRule, but not createAndroidComposeRule: debugImplementation("androidx.compose.ui:ui-test-manifest:1.3.3") androidTestImplementation 'tools.fastlane:screengrab:2.1.1' } def isNonStable = { String version -> def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } def regex = /^[0-9,.v-]+(-r)?$/ return !stableKeyword && !(version ==~ regex) } dependencyUpdates { rejectVersionIf { isNonStable(it.candidate.version) } }