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

update theme and build files #74

Closed
wants to merge 1 commit into from
Closed
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
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 Exception("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 @@ -21,9 +22,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

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

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
Expand All @@ -41,7 +39,7 @@ android {

defaultConfig {
applicationId "io.vikunja.app"
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 34
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionCode flutterVersionCode.toInteger()
Expand Down Expand Up @@ -106,7 +104,7 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
14 changes: 0 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.23'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
30 changes: 20 additions & 10 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +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 flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '7.4.2' apply false
id "org.jetbrains.kotlin.android" version "1.9.23" apply false
}

include ":app"
2 changes: 1 addition & 1 deletion lib/components/BucketTaskCard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _BucketTaskCardState extends State<BucketTaskCard>
widget.task.identifier.isNotEmpty
? '#${widget.task.identifier}'
: '${widget.task.id}',
style: (theme.textTheme.subtitle2 ?? TextStyle()).copyWith(
style: (theme.textTheme.titleSmall ?? TextStyle()).copyWith(
color: Colors.grey,
),
),
Expand Down
12 changes: 5 additions & 7 deletions lib/theme/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ ThemeData buildVikunjaMaterialDarkTheme() {
ThemeData _buildVikunjaTheme(ThemeData base, {bool isDark = false}) {
return base.copyWith(
useMaterial3: true,
errorColor: vRed,
primaryColor: vPrimaryDark,
primaryColorLight: vPrimary,
primaryColorDark: vBlueDark,
colorScheme: base.colorScheme.copyWith(
primary: vPrimaryDark,
secondary: vPrimary,
),
floatingActionButtonTheme: base.floatingActionButtonTheme.copyWith(
foregroundColor: vWhite,
),
Expand All @@ -40,7 +35,7 @@ ThemeData _buildVikunjaTheme(ThemeData base, {bool isDark = false}) {
// title: base.textTheme.title.copyWith(
// fontFamily: 'Quicksand',
// ),
button: base.textTheme.button?.copyWith(
labelLarge: base.textTheme.labelLarge?.copyWith(
color:
vWhite, // This does not work, looks like a bug in Flutter: https://github.com/flutter/flutter/issues/19623
),
Expand All @@ -65,6 +60,9 @@ ThemeData _buildVikunjaTheme(ThemeData base, {bool isDark = false}) {
.withLightness(max(_hslColor.lightness - 0.03, 0))
.toColor();
}(),
),
), colorScheme: base.colorScheme.copyWith(
primary: vPrimaryDark,
secondary: vPrimary,
).copyWith(error: vRed),
);
}
8 changes: 5 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: vikunja_app
description: Vikunja as Flutter cross platform app

version: 0.1.5-beta
version: 0.1.6

environment:
sdk: ">=2.18.0 <3.0.0"
Expand All @@ -24,7 +24,6 @@ dependencies:
petitparser: ^6.0.2
provider: ^6.1.2
webview_flutter: ^4.7.0
flutter_colorpicker: ^1.0.3
flutter_keyboard_visibility: ^6.0.0
dotted_border: ^2.1.0
url_launcher: ^6.2.5
Expand All @@ -33,7 +32,10 @@ dependencies:
dynamic_color: ^1.7.0
flutter_widget_from_html: ^0.14.11
flutter_downloader: ^1.11.6

flutter_colorpicker:
git:
url: https://github.com/mchome/flutter_colorpicker
ref: master # or 786d04363f587b818ce585d25b9c2bb62de95aba
meta: ^1.11.0
timezone: ^0.9.2
json_annotation: ^4.8.1
Expand Down
Loading