Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #40

Merged
merged 9 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 27 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,72 +1,38 @@
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex
/*/build/
build/*

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
# Crashlytics configuations
com_crashlytics_export_strings.xml

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/
# Gradle generated files
.gradle/

# Android Studio captures folder
captures/
# Signing files
.signing/

# IntelliJ
# User-specific configurations
.idea/*
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# OS-specific files
.DS_Store
.gradle/4.4/fileHashes/fileHashes.lock
*.bin
*.lock
*.lock
.idea/misc.xml
.idea/workspace.xml
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Documents
*.pdf
*.doc
*.docx
*.odt

# APKs
*.apk

52 changes: 38 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
Expand All @@ -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") {
Expand Down
10 changes: 10 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- Disable the NotificationPermission check for glide -->
<issue id="NotificationPermission">
<ignore regexp="com.bumptech.glide.request.target.NotificationTarget" />
</issue>

<!-- Set the severity of missing translations to warning instead of error -->
<issue id="MissingTranslation" severity="warning" />
</lint>
12 changes: 5 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -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="org.secuso.privacyfriendly2048">
xmlns:tools="http://schemas.android.com/tools">

<supports-screens
android:anyDensity="true"
Expand Down Expand Up @@ -59,9 +58,9 @@
<activity
android:name="org.secuso.privacyfriendly2048.activities.StatsActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
</activity>
<activity
android:name=".activities.SettingsActivity"
Expand All @@ -75,8 +74,7 @@
<activity
android:name=".activities.GameActivity"
android:label="@string/title_activity_game"
android:parentActivityName=".activities.MainActivity"
>
android:parentActivityName=".activities.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.secuso.privacyfriendly2048.activities.MainActivity" />
Expand Down
8 changes: 1 addition & 7 deletions app/src/main/java/org/secuso/privacyfriendly2048/PF2048.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
package org.secuso.privacyfriendly2048

import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import android.os.Build
import android.util.Log
import androidx.appcompat.app.AppCompatDelegate
import androidx.work.Configuration
import org.secuso.privacyfriendly2048.backup.BackupCreator
import org.secuso.privacyfriendly2048.backup.BackupRestorer
Expand All @@ -34,7 +30,5 @@ class PF2048 : Application(), Configuration.Provider {
super.onCreate()
}

override fun getWorkManagerConfiguration(): Configuration {
return Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
}
override val workManagerConfiguration = Configuration.Builder().setMinimumLoggingLevel(Log.INFO).build()
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
package org.secuso.privacyfriendly2048.activities;

import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import org.secuso.privacyfriendly2048.BuildConfig;
import org.secuso.privacyfriendly2048.R;
import org.secuso.privacyfriendly2048.activities.helper.BaseActivity;
Expand All @@ -43,7 +44,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_about);

ActionBar ab = getSupportActionBar();
if(ab != null) {
if (ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}

Expand All @@ -55,9 +56,9 @@ protected void onCreate(Bundle savedInstanceState) {

overridePendingTransition(0, 0);

((TextView)findViewById(R.id.secusoWebsite)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView)findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView)findViewById(R.id.textFieldVersionName)).setText(getString(R.string.version_number, BuildConfig.VERSION_NAME));
((TextView) findViewById(R.id.secusoWebsite)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView) findViewById(R.id.githubURL)).setMovementMethod(LinkMovementMethod.getInstance());
((TextView) findViewById(R.id.textFieldVersionName)).setText(getString(R.string.version_number, BuildConfig.VERSION_NAME));
}

//@Override
Expand Down
Loading
Loading