mirror of
				https://github.com/SimpleMobileTools/Simple-Flashlight.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	Merge pull request #206 from fatihergin/feature/migrating-to-sdk-34
Feature/migrating to sdk 34
This commit is contained in:
		| @@ -8,12 +8,13 @@ if (keystorePropertiesFile.exists()) { | |||||||
| } | } | ||||||
|  |  | ||||||
| android { | android { | ||||||
|     compileSdkVersion 33 |     namespace "com.simplemobiletools.flashlight" | ||||||
|  |     compileSdk 34 | ||||||
|  |  | ||||||
|     defaultConfig { |     defaultConfig { | ||||||
|         applicationId "com.simplemobiletools.flashlight" |         applicationId "com.simplemobiletools.flashlight" | ||||||
|         minSdkVersion 23 |         minSdk 23 | ||||||
|         targetSdkVersion 33 |         targetSdk 34 | ||||||
|         versionCode 64 |         versionCode 64 | ||||||
|         versionName "5.9.2" |         versionName "5.9.2" | ||||||
|         setProperty("archivesBaseName", "flashlight") |         setProperty("archivesBaseName", "flashlight") | ||||||
| @@ -48,7 +49,16 @@ android { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     flavorDimensions "variants" |     compileOptions { | ||||||
|  |         sourceCompatibility JavaVersion.VERSION_17 | ||||||
|  |         targetCompatibility JavaVersion.VERSION_17 | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     kotlinOptions { | ||||||
|  |         jvmTarget = '17' | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     flavorDimensions = ["variants"] | ||||||
|     productFlavors { |     productFlavors { | ||||||
|         core {} |         core {} | ||||||
|         fdroid {} |         fdroid {} | ||||||
| @@ -66,7 +76,7 @@ android { | |||||||
| } | } | ||||||
|  |  | ||||||
| dependencies { | dependencies { | ||||||
|     implementation 'com.github.SimpleMobileTools:Simple-Commons:fa61be64d8' |     implementation 'com.github.SimpleMobileTools:Simple-Commons:7c1e5b5777' | ||||||
|     implementation 'org.greenrobot:eventbus:3.3.1' |     implementation 'org.greenrobot:eventbus:3.3.1' | ||||||
|     implementation 'androidx.constraintlayout:constraintlayout:2.1.4' |     implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | ||||||
| } | } | ||||||
|   | |||||||
| @@ -7,11 +7,12 @@ import android.view.WindowManager | |||||||
| import com.simplemobiletools.commons.dialogs.ColorPickerDialog | import com.simplemobiletools.commons.dialogs.ColorPickerDialog | ||||||
| import com.simplemobiletools.commons.extensions.applyColorFilter | import com.simplemobiletools.commons.extensions.applyColorFilter | ||||||
| import com.simplemobiletools.commons.extensions.getContrastColor | import com.simplemobiletools.commons.extensions.getContrastColor | ||||||
|  | import com.simplemobiletools.commons.extensions.viewBinding | ||||||
| import com.simplemobiletools.flashlight.databinding.ActivityBrightDisplayBinding | import com.simplemobiletools.flashlight.databinding.ActivityBrightDisplayBinding | ||||||
| import com.simplemobiletools.flashlight.extensions.config | import com.simplemobiletools.flashlight.extensions.config | ||||||
|  |  | ||||||
| class BrightDisplayActivity : SimpleActivity() { | class BrightDisplayActivity : SimpleActivity() { | ||||||
|     private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivityBrightDisplayBinding.inflate(layoutInflater) } |     private val binding by viewBinding(ActivityBrightDisplayBinding::inflate) | ||||||
|  |  | ||||||
|     override fun onCreate(savedInstanceState: Bundle?) { |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|         window.addFlags( |         window.addFlags( | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ class MainActivity : SimpleActivity() { | |||||||
|         private const val STROBOSCOPE_STATE = "stroboscope_state" |         private const val STROBOSCOPE_STATE = "stroboscope_state" | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivityMainBinding.inflate(layoutInflater) } |     private val binding by viewBinding(ActivityMainBinding::inflate) | ||||||
|  |  | ||||||
|     private var mBus: EventBus? = null |     private var mBus: EventBus? = null | ||||||
|     private var mCameraImpl: MyCameraImpl? = null |     private var mCameraImpl: MyCameraImpl? = null | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ import java.util.Locale | |||||||
| import kotlin.system.exitProcess | import kotlin.system.exitProcess | ||||||
|  |  | ||||||
| class SettingsActivity : SimpleActivity() { | class SettingsActivity : SimpleActivity() { | ||||||
|     private val binding by lazy(LazyThreadSafetyMode.NONE) { ActivitySettingsBinding.inflate(layoutInflater) } |     private val binding by viewBinding(ActivitySettingsBinding::inflate) | ||||||
|  |  | ||||||
|     override fun onCreate(savedInstanceState: Bundle?) { |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|         isMaterialActivity = true |         isMaterialActivity = true | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ import com.simplemobiletools.flashlight.extensions.config | |||||||
| import com.simplemobiletools.flashlight.helpers.MyWidgetBrightDisplayProvider | import com.simplemobiletools.flashlight.helpers.MyWidgetBrightDisplayProvider | ||||||
|  |  | ||||||
| class WidgetBrightDisplayConfigureActivity : SimpleActivity() { | class WidgetBrightDisplayConfigureActivity : SimpleActivity() { | ||||||
|     private val binding by lazy(LazyThreadSafetyMode.NONE) { WidgetBrightDisplayConfigBinding.inflate(layoutInflater) } |     private val binding by viewBinding(WidgetBrightDisplayConfigBinding::inflate) | ||||||
|  |  | ||||||
|     private var mWidgetAlpha = 0f |     private var mWidgetAlpha = 0f | ||||||
|     private var mWidgetId = 0 |     private var mWidgetId = 0 | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ import com.simplemobiletools.flashlight.extensions.updateBrightDisplayWidget | |||||||
| import com.simplemobiletools.flashlight.helpers.MyWidgetTorchProvider | import com.simplemobiletools.flashlight.helpers.MyWidgetTorchProvider | ||||||
|  |  | ||||||
| class WidgetTorchConfigureActivity : SimpleActivity() { | class WidgetTorchConfigureActivity : SimpleActivity() { | ||||||
|     private val binding by lazy(LazyThreadSafetyMode.NONE) { WidgetTorchConfigBinding.inflate(layoutInflater) } |     private val binding by viewBinding(WidgetTorchConfigBinding::inflate) | ||||||
|  |  | ||||||
|     private var mWidgetAlpha = 0f |     private var mWidgetAlpha = 0f | ||||||
|     private var mWidgetId = 0 |     private var mWidgetId = 0 | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| // Top-level build file where you can add configuration options common to all sub-projects/modules. | // Top-level build file where you can add configuration options common to all sub-projects/modules. | ||||||
|  |  | ||||||
| buildscript { | buildscript { | ||||||
|     ext.kotlin_version = '1.7.10' |     ext.kotlin_version = '1.9.0' | ||||||
|  |  | ||||||
|     repositories { |     repositories { | ||||||
|         google() |         google() | ||||||
| @@ -9,7 +9,7 @@ buildscript { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     dependencies { |     dependencies { | ||||||
|         classpath 'com.android.tools.build:gradle:7.3.1' |         classpath 'com.android.tools.build:gradle:8.1.0' | ||||||
|         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||||||
|  |  | ||||||
|         // NOTE: Do not place your application dependencies here; they belong |         // NOTE: Do not place your application dependencies here; they belong | ||||||
|   | |||||||
| @@ -1,2 +1,4 @@ | |||||||
| android.enableJetifier=true | android.enableJetifier=true | ||||||
| android.useAndroidX=true | android.useAndroidX=true | ||||||
|  | android.nonTransitiveRClass=false | ||||||
|  | org.gradle.jvmargs=-Xmx4g | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								gradle/wrapper/gradle-wrapper.properties
									
									
									
									
										vendored
									
									
								
							| @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME | |||||||
| distributionPath=wrapper/dists | distributionPath=wrapper/dists | ||||||
| zipStoreBase=GRADLE_USER_HOME | zipStoreBase=GRADLE_USER_HOME | ||||||
| zipStorePath=wrapper/dists | zipStorePath=wrapper/dists | ||||||
| distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user