diff --git a/app/build.gradle b/app/build.gradle index 92d7ca7..0032737 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,16 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' +plugins { + id 'com.android.application' + id 'kotlin-android' + id 'kotlin-kapt' + id 'com.google.devtools.ksp' +} android { - compileSdkVersion 33 defaultConfig { applicationId 'org.secuso.privacyfriendly2048' minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 + compileSdk 34 versionCode 5 versionName "1.3" } @@ -18,32 +22,52 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_17.toString() + } + + kotlin { + jvmToolchain(17) + } + + android.applicationVariants.configureEach { variant -> + variant.outputs.all { + def appName = "pfa-2048" + outputFileName = appName + "-${variant.name}-v${variant.versionName}.apk" + } } dataBinding { enabled = true } + namespace 'org.secuso.privacyfriendly2048' + + lint { + lintConfig = file("lint.xml") + } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - testImplementation 'junit:junit:4.12' - implementation 'androidx.appcompat:appcompat:1.0.0' - implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.11.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'com.github.bumptech.glide:glide:4.7.1' - annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1' + implementation 'com.github.bumptech.glide:glide:4.11.0' + annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' // Backup implementation project(path: ':backup-api') - def work_version = "2.4.0" + def work_version = "2.9.0" implementation "androidx.work:work-runtime:$work_version" implementation "androidx.work:work-runtime-ktx:$work_version" androidTestImplementation "androidx.work:work-testing:$work_version" - implementation 'androidx.sqlite:sqlite-ktx:2.3.1' + implementation 'androidx.sqlite:sqlite-ktx:2.4.0' constraints { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { diff --git a/app/lint.xml b/app/lint.xml new file mode 100644 index 0000000..1b66a25 --- /dev/null +++ b/app/lint.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 69d0ffb..bdb16a2 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> getTableNames() { if (c.moveToFirst()) { while (!c.isAfterLast()) { - arrTblNames.add(c.getString(c.getColumnIndex("name"))); + arrTblNames.add(c.getString(c.getColumnIndexOrThrow("name"))); c.moveToNext(); } } diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index c176eef..f1dd0f8 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -48,7 +48,6 @@ android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" - android:onClick="onClick" android:padding="@dimen/activity_horizontal_margin" android:src="@drawable/ic_keyboard_arrow_left_black_24dp" /> @@ -75,7 +74,6 @@ android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" - android:onClick="onClick" android:padding="10dp" android:src="@drawable/ic_keyboard_arrow_right_black_24dp" /> @@ -121,7 +119,6 @@ android:layout_weight="3" android:background="@color/colorPrimary" android:clickable="false" - android:onClick="onClick" android:text="@string/new_Game_Button" android:textColor="@color/white" android:textStyle="normal" /> @@ -137,7 +134,6 @@ android:layout_weight="3" android:background="@color/colorPrimary" android:clickable="false" - android:onClick="onClick" android:text="@string/continue_Game_Button" android:textColor="@color/white" android:textStyle="normal" /> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ac13d54..71853c9 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -53,14 +53,13 @@ android:id="@+id/btn_prev" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin" + android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" - android:onClick="onClick" android:padding="@dimen/activity_horizontal_margin" android:src="@drawable/ic_keyboard_arrow_left_black_24dp" android:visibility="invisible" /> @@ -76,7 +75,6 @@ android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_weight="1" android:background="?attr/selectableItemBackgroundBorderless" - android:onClick="onClick" android:padding="10dp" android:src="@drawable/ic_keyboard_arrow_right_black_24dp" /> @@ -90,10 +88,10 @@ android:divider="#000" android:gravity="center_horizontal" android:orientation="vertical" - android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingBottom="@dimen/activity_vertical_margin" android:weightSum="5" tools:context=".activities.MainActivity"> @@ -101,8 +99,8 @@ android:id="@+id/layoutDots" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_alignParentBottom="true" android:layout_alignParentStart="true" + android:layout_alignParentBottom="true" android:layout_weight="1" android:gravity="center" android:orientation="horizontal"> @@ -115,12 +113,11 @@ android:layout_height="0dp" android:layout_gravity="center_horizontal" android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" android:layout_marginTop="10dp" + android:layout_marginRight="20dp" android:layout_weight="2" android:background="@drawable/standalone_button" android:clickable="false" - android:onClick="onClick" android:text="@string/new_Game_Button" android:textColor="@color/white" android:textSize="25sp" @@ -132,12 +129,11 @@ android:layout_height="0dp" android:layout_gravity="center_horizontal" android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" android:layout_marginTop="10dp" + android:layout_marginRight="20dp" android:layout_weight="2" android:background="@drawable/standalone_button" android:clickable="false" - android:onClick="onClick" android:text="@string/continue_Game_Button" android:textColor="@color/white" android:textSize="25sp" diff --git a/build.gradle b/build.gradle index 2b34868..f369406 100644 --- a/build.gradle +++ b/build.gradle @@ -2,13 +2,13 @@ buildscript { repositories { - jcenter() + mavenCentral() google() } - ext.kotlin_version = "1.7.20" + ext.kotlin_version = "1.9.10" dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong @@ -16,9 +16,13 @@ buildscript { } } +plugins { + id 'com.google.devtools.ksp' version "$kotlin_version-1.0.13" apply false +} + allprojects { repositories { - jcenter() + mavenCentral() google() } } diff --git a/gradle.properties b/gradle.properties index 915f0e6..caa86e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,9 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.nonFinalResIds=false +android.nonTransitiveRClass=false +android.useAndroidX=true +org.gradle.jvmargs=-Xmx1536m \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e25ae8d..d6576a9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip \ No newline at end of file diff --git a/libs/privacy-friendly-backup-api b/libs/privacy-friendly-backup-api index 2548856..8687a8d 160000 --- a/libs/privacy-friendly-backup-api +++ b/libs/privacy-friendly-backup-api @@ -1 +1 @@ -Subproject commit 254885602ee4501a572f56306fbf2b3712cfc834 +Subproject commit 8687a8dbd170866707dc41bcb879375400ef697a