build: migrate to agp 8.0.2

This commit is contained in:
FunkyMuse 2023-06-27 21:42:59 +02:00
parent 73c87aca56
commit 90febae626
7 changed files with 78 additions and 6 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ keystore.properties
fastlane/fastlane.json
Gemfile
Gemfile.lock
/java_pid3915.hprof

View File

@ -55,6 +55,7 @@ android {
buildFeatures {
viewBinding = true
compose = true
buildConfig = true
}
composeOptions {
@ -93,6 +94,7 @@ android {
checkReleaseBuilds = false
abortOnError = false
}
namespace = "com.simplemobiletools.calculator"
}
dependencies {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.simplemobiletools.calculator"
android:installLocation="auto">
<uses-permission

View File

@ -7,6 +7,7 @@ import android.os.Bundle
import android.view.View
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.ui.graphics.Color
import com.simplemobiletools.calculator.compose.screens.SettingsScreen
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
import com.simplemobiletools.calculator.compose.theme.Theme
@ -32,7 +33,7 @@ class SettingsActivity : AppCompatActivity() {
AppThemeSurface {
SettingsScreen(
customizeColors = ::handleCustomizeColorsClick, goBack = ::finish,
backgroundColor = getProperBackgroundColor()
backgroundColor = getProperBackgroundColor(),
)
}
}

View File

@ -12,6 +12,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.core.graphics.toColor
@ -21,18 +22,22 @@ import com.simplemobiletools.calculator.compose.settings.SettingsGroup
import com.simplemobiletools.calculator.compose.settings.SettingsPreferenceComponent
import com.simplemobiletools.calculator.compose.settings.SettingsTitleTextComponent
import com.simplemobiletools.calculator.compose.theme.AppThemeSurface
import com.simplemobiletools.calculator.compose.theme.primaryColor
import com.simplemobiletools.commons.R
@Composable
fun SettingsScreen(
goBack: () -> Unit,
customizeColors: () -> Unit,
backgroundColor: Int
backgroundColor: Int,
topBarsScrolledContainerColor: Color = primaryColor
) {
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
Scaffold(
modifier = Modifier
.fillMaxSize()
.background(Color(backgroundColor)),
.background(Color(backgroundColor))
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
TopAppBar(
title = {
@ -50,7 +55,11 @@ fun SettingsScreen(
.clickable { goBack() }
.padding(start = 8.dp)
)
}
},
scrollBehavior = scrollBehavior,
colors = TopAppBarDefaults.largeTopAppBarColors(
scrolledContainerColor = topBarsScrolledContainerColor,
),
)
}
) { paddingValues ->

View File

@ -95,6 +95,66 @@
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder2"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you2"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/purchase_simple_thank_you" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder3"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you3"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/purchase_simple_thank_you" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder4"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you4"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/purchase_simple_thank_you" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_purchase_thank_you_holder5"
style="@style/SettingsHolderTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/settings_purchase_thank_you5"
style="@style/SettingsTextLabelStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/purchase_simple_thank_you" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/settings_use_english_holder"
style="@style/SettingsHolderCheckboxStyle"

View File

@ -21,7 +21,7 @@ room = "2.5.2"
#Simple tools
simple-commons = "4c83ec8740"
#Gradle
gradlePlugins-agp = "7.3.1"
gradlePlugins-agp = "8.0.2"
#build
app-build-compileSDKVersion = "34"
app-build-targetSDK = "33"