Skip to content

Commit

Permalink
Merge pull request #5 from user5522/dev
Browse files Browse the repository at this point in the history
Merge Main and Dev
  • Loading branch information
user5522 authored Aug 14, 2024
2 parents 8fd0b39 + 020d0fb commit 0215a09
Show file tree
Hide file tree
Showing 133 changed files with 4,710 additions and 1,853 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
name: Android Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "zulu"
cache: 'gradle'
cache: "gradle"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
Expand All @@ -31,7 +31,7 @@ jobs:
run: flutter build apk --release --split-per-abi
- name: Sign APK
id: sign_apk
uses: r0adkll/sign-android-release@v1
uses: filippoLeporati93/android-release-signer@v1
with:
releaseDirectory: build/app/outputs/flutter-apk/
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }}
Expand All @@ -41,19 +41,19 @@ jobs:
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Archive arm64-v8a
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: android-arm64-v8a
path: |
build/app/outputs/flutter-apk/*-arm64-v8a-release-signed.apk
- name: Archive armeabi-v7a
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: android-armeabi-v7a
path: |
build/app/outputs/flutter-apk/*-armeabi-v7a-release-signed.apk
- name: Archive x86_64
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: android-x86_64
path: |
Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
# Timetable
![Workflow Status](https://github.com/user5522/timetable/actions/workflows/build.yml/badge.svg)

A Flutter based Android timetable application for managing time.
A Flutter based Android timetable application for managing time.

## some screenshots
<table>
<tr>
<td><img src="https://github.com/user5522/timetable/assets/65370936/a2964797-9f4d-4fb0-86ff-3f7145fbd969" alt="grid view screen in compact mode" width=360px height=731px /></td>
<td><img src="https://github.com/user5522/timetable/assets/65370936/0c4f8060-d9ee-4078-9768-82d5ea5ebfba" alt="day view screen" width=360px height=731px /></td>
</tr>
<tr>
<td><img src="https://github.com/user5522/timetable/assets/65370936/9ae21d59-a489-47a3-866a-995d872af136" alt="grid view in compact mode with example subjects placed" width=360px height=731px /></td>
<td><img src="https://github.com/user5522/timetable/assets/65370936/a345fcae-aaf0-4a64-ace8-aebac7dd7242" alt="day view in monday with example subjects" width=360px height=731px /></td>
</tr>
<tr>
<td><img src="https://github.com/user5522/timetable/assets/65370936/e8213475-2b75-444a-8e85-9a71a0d23123" alt="subject creation/editing screen" width=360px height=731px /></td>
<td><img src="https://github.com/user5522/timetable/assets/65370936/e95309f0-c2e0-452e-ac5f-802ae99dd526" alt="settings screen" width=360px height=731px /></td>
</tr>
</table>

## features

| Feature | Availability |
|------------------------------------------------------|-----------------|
| Grid view ||
| Day view ||
| CRUD subjects in both views ||
| Settings ||
| Rotation weeks ||
| Edit timetable time period ||
| Material You ||
| Dark, Light, System themes ||
| Current day indicator (Grid) ||
| Multiple timetables ||
| Hide bottom navbar <br>(more screen real estate) ||
| Localization | English, French |

found a bug? please create [an issue](https://github.com/user5522/timetable/issues/new) and I'll do my best to resolve it :)
18 changes: 8 additions & 10 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -27,12 +28,9 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "tk.user5522.learnflutter.projects"
namespace "tk.user5522.timetable"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

Expand Down Expand Up @@ -70,5 +68,5 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0"
}
1 change: 1 addition & 0 deletions android/app/roguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class androidx.lifecycle.DefaultLifecycleObserver
5 changes: 4 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<application
android:label="Timetable"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:fullBackupOnly="false"
>
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down

This file was deleted.

35 changes: 35 additions & 0 deletions android/app/src/main/kotlin/tk/user5522/timetable/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package tk.user5522.timetable

import io.flutter.embedding.android.FlutterActivity
import android.os.Build
import androidx.annotation.NonNull
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel


class MainActivity: FlutterActivity() {
private val CHANNEL = "tk.user5522.timetable/androidVersion"

fun getAndroidVersion(): Int {
return Build.VERSION.SDK_INT
}

override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler {
call, result ->
if (call.method == "getAndroidVersion") {
val androidVersion = getAndroidVersion()

if (androidVersion != -1) {
result.success(androidVersion)
} else {
// result.error("UNAVAILABLE", 0, null)
}
} else {
result.notImplemented()
}
}
}

}
7 changes: 7 additions & 0 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />

<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
15 changes: 0 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -21,8 +8,6 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

Expand Down
30 changes: 22 additions & 8 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

include ":app"
Loading

0 comments on commit 0215a09

Please sign in to comment.