Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"debug.openDebug": "openOnDebugBreak",
"files.autoSave": "onFocusChange",
"files.autoSave": "afterDelay",
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,

Expand Down
10 changes: 5 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ analyzer:
close_sinks: ignore
missing_required_param: error
missing_return: error
no_default_cases: ignore

strong-mode:
implicit-casts: true
Expand All @@ -18,7 +19,7 @@ dart_code_metrics:
maximum-nesting-level: 5
source-lines-of-code: 50
maintainability-index: 40

rules:
- no-boolean-literal-compare
- no-empty-block
Expand All @@ -38,13 +39,13 @@ dart_code_metrics:
- prefer-single-widget-per-file:
ignore-private-widgets: true
- prefer-extracting-callbacks

metrics-exclude:
- test/**

rules-exclude:
- test/**

anti-patterns:
- long-method
- long-parameter-list
Expand Down Expand Up @@ -124,7 +125,6 @@ linter:
- one_member_abstracts
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- parameter_assignments
Expand Down
3 changes: 2 additions & 1 deletion android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
83 changes: 0 additions & 83 deletions android/app/build.gradle

This file was deleted.

89 changes: 89 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import java.util.Properties
import java.io.FileInputStream

plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
id("com.google.gms.google-services")
}

val localProperties = Properties().apply {
val localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.reader(Charsets.UTF_8).use { load(it) }
}
}

val flutterVersionCode = localProperties.getProperty("flutter.versionCode") ?: "1"
val flutterVersionName = localProperties.getProperty("flutter.versionName") ?: "1.0"

val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
FileInputStream(keystorePropertiesFile).use { keystoreProperties.load(it) }
}

android {
compileSdk = 35

namespace = "de.asta_bochum.campus_app"

compileOptions {
// Flag to enable support for the new language APIs
isCoreLibraryDesugaringEnabled = true
// Sets Java compatibility to Java 11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "de.asta_bochum.campus_app"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 26
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName

multiDexEnabled = true

// Add the Dart define flag for Cronet HTTP without Play Services
applicationVariants.all {
mergedFlavor.manifestPlaceholders["cronetHttpNoPlay"] = "true"
}
}

signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as? String
keyPassword = keystoreProperties["keyPassword"] as? String
storeFile = keystoreProperties["storeFile"]?.toString()?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as? String
}
}

buildTypes {
getByName("release") {
// TODO: Add your own signing config for the release build.
signingConfig = signingConfigs.getByName("release")
}
}
}

flutter {
source = "../.."
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.20")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.appcompat:appcompat-resources:1.6.1")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
}
18 changes: 0 additions & 18 deletions android/build.gradle

This file was deleted.

21 changes: 21 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
allprojects {
repositories {
google()
mavenCentral()
}
}

val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)

subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
5 changes: 3 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Mon Jul 24 21:37:27 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
26 changes: 0 additions & 26 deletions android/settings.gradle

This file was deleted.

26 changes: 26 additions & 0 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("com.google.gms.google-services") version "4.4.0" apply false
}

include(":app")
Binary file added assets/img/icons/translate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/img/icons/translation-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading