Skip to content

Commit

Permalink
Remove unused dependencies, lower minSdk
Browse files Browse the repository at this point in the history
  • Loading branch information
papjul committed Mar 8, 2024
1 parent eda9a2e commit cfbef1d
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 92 deletions.
20 changes: 13 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ plugins {

android {
namespace = "org.breezyweather.pixeliconprovider"
compileSdk = 34

defaultConfig {
applicationId = "org.breezyweather.pixeliconprovider"
minSdk = 21
targetSdk = 34
versionCode = 2
versionName = "2.0"
}
Expand All @@ -23,20 +26,23 @@ android {
}

buildFeatures {
compose = true
buildConfig = true
compose = false
buildConfig = false

// Disable some unused things
aidl = false
renderScript = false
shaders = false
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}

dependencies {
implementation(libs.activity.compose)
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}

dependencies {}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

package org.breezyweather.pixeliconprovider

import android.app.Activity
import android.os.Bundle

import androidx.activity.ComponentActivity

class MainActivity : ComponentActivity() {
class MainActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
finish()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import android.graphics.PorterDuffXfermode
import android.graphics.Rect
import android.graphics.Xfermode
import android.graphics.drawable.Drawable
import androidx.annotation.ColorInt
import kotlin.math.min
import kotlin.math.sin

Expand All @@ -36,7 +35,6 @@ class PixelMoonDrawable : Drawable() {
}
private val mClearXfermode: Xfermode

@ColorInt
private val mCoreColor: Int = Color.rgb(180, 138, 255)
private var mAlpha: Float = 1f
private var mBounds: Rect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.graphics.Paint
import android.graphics.PixelFormat
import android.graphics.Rect
import android.graphics.drawable.Drawable
import androidx.annotation.ColorInt
import kotlin.math.min
import kotlin.math.sin

Expand All @@ -32,7 +31,6 @@ class PixelSunDrawable : Drawable() {
isAntiAlias = true
}

@ColorInt
private val mColor: Int = Color.rgb(255, 215, 5)
private var mAlpha: Float = 1f
private var mBounds: Rect
Expand Down
28 changes: 3 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.BasePlugin
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

subprojects {
tasks.withType<KotlinJvmCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}

plugins.withType<BasePlugin> {
configure<BaseExtension> {
compileSdkVersion(AndroidConfig.compileSdk)
defaultConfig {
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
}
plugins {
id("com.android.application") version "8.3.0" apply false
kotlin("android") version "1.9.23" apply false
}

tasks.register<Delete>("clean") {
Expand Down
17 changes: 0 additions & 17 deletions buildSrc/build.gradle.kts

This file was deleted.

7 changes: 0 additions & 7 deletions buildSrc/settings.gradle.kts

This file was deleted.

5 changes: 0 additions & 5 deletions buildSrc/src/main/kotlin/AndroidConfig.kt

This file was deleted.

16 changes: 0 additions & 16 deletions gradle/libs.versions.toml

This file was deleted.

8 changes: 0 additions & 8 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
pluginManagement {
resolutionStrategy {
eachPlugin {
val regex = "com.android.(library|application)".toRegex()
if (regex matches requested.id.id) {
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
}
repositories {
gradlePluginPortal()
google()
Expand Down

0 comments on commit cfbef1d

Please sign in to comment.