This commit is contained in:
parent
67e47b03cd
commit
fa05e0e6a3
129
.drone.yml
129
.drone.yml
|
@ -1,58 +1,117 @@
|
||||||
|
kind: pipeline
|
||||||
|
name: testing
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
base: /app
|
base: /app
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
git:
|
|
||||||
image: plugins/git
|
|
||||||
depth: 50
|
depth: 50
|
||||||
tags: true
|
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
- name: build
|
||||||
image: jonasfranz/flutter:master
|
image: adamantium/flutter
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
|
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
|
||||||
- flutter packages get
|
- flutter packages get
|
||||||
- make format-check
|
- make format-check
|
||||||
|
- make build-debug
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
image: adamantium/flutter
|
||||||
|
pull: true
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
|
||||||
|
- flutter packages get
|
||||||
|
- make test
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: release-latest
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /app
|
||||||
|
|
||||||
|
clone:
|
||||||
|
depth: 50
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
|
||||||
|
- name: build
|
||||||
|
image: adamantium/flutter
|
||||||
|
pull: true
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
|
||||||
|
- flutter packages get
|
||||||
- make build-all
|
- make build-all
|
||||||
- mkdir apks
|
- mkdir apks
|
||||||
- mv build/app/outputs/apk/*/*/*.apk apks
|
- mv build/app/outputs/apk/*/*/*.apk apks
|
||||||
when:
|
|
||||||
event: [ push, tag ]
|
|
||||||
|
|
||||||
test:
|
|
||||||
image: jonasfranz/flutter:master
|
|
||||||
pull: true
|
|
||||||
commands:
|
|
||||||
- make test
|
|
||||||
when:
|
|
||||||
event: [ push, tag, pull_request ]
|
|
||||||
|
|
||||||
# Push the releases to our pseudo-s3-bucket
|
# Push the releases to our pseudo-s3-bucket
|
||||||
release:
|
- name: release
|
||||||
image: plugins/s3:1
|
image: plugins/s3:1
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
settings:
|
||||||
bucket: vikunja-app
|
|
||||||
endpoint: https://storage.kolaente.de
|
|
||||||
path_style: true
|
|
||||||
strip_prefix: apks/
|
|
||||||
source: apks/*
|
|
||||||
target: /${DRONE_TAG##v}
|
|
||||||
when:
|
|
||||||
event: [ tag ]
|
|
||||||
|
|
||||||
# Push the releases to our pseudo-s3-bucket
|
|
||||||
release:
|
|
||||||
image: plugins/s3:1
|
|
||||||
pull: true
|
|
||||||
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
|
||||||
bucket: vikunja-app
|
bucket: vikunja-app
|
||||||
|
access_key:
|
||||||
|
from_secret: aws_access_key_id
|
||||||
|
secret_key:
|
||||||
|
from_secret: aws_secret_access_key
|
||||||
endpoint: https://storage.kolaente.de
|
endpoint: https://storage.kolaente.de
|
||||||
path_style: true
|
path_style: true
|
||||||
strip_prefix: apks/
|
strip_prefix: apks/
|
||||||
source: apks/*
|
source: apks/*
|
||||||
target: /master
|
target: /master
|
||||||
when:
|
|
||||||
event: [ push ]
|
---
|
||||||
branch: [ master ]
|
kind: pipeline
|
||||||
|
name: release-version
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /app
|
||||||
|
|
||||||
|
clone:
|
||||||
|
depth: 50
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
|
||||||
|
- name: build
|
||||||
|
image: adamantium/flutter
|
||||||
|
pull: true
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
|
||||||
|
- flutter packages get
|
||||||
|
- make build-all
|
||||||
|
- mkdir apks
|
||||||
|
- mv build/app/outputs/apk/*/*/*.apk apks
|
||||||
|
# Push the releases to our pseudo-s3-bucket
|
||||||
|
- name: release
|
||||||
|
image: plugins/s3:1
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
bucket: vikunja-app
|
||||||
|
access_key:
|
||||||
|
from_secret: aws_access_key_id
|
||||||
|
secret_key:
|
||||||
|
from_secret: aws_secret_access_key
|
||||||
|
endpoint: https://storage.kolaente.de
|
||||||
|
path_style: true
|
||||||
|
strip_prefix: apks/
|
||||||
|
source: apks/*
|
||||||
|
target: /${DRONE_TAG##v}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
.pub-cache/
|
.pub-cache/
|
||||||
.pub/
|
.pub/
|
||||||
build/
|
build/
|
||||||
|
!pubspec.lock
|
||||||
|
|
||||||
# Android related
|
# Android related
|
||||||
**/android/**/gradle-wrapper.jar
|
**/android/**/gradle-wrapper.jar
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Vikunja Cross-Plattform app
|
# Vikunja Cross-Plattform app
|
||||||
|
|
||||||
[![Build Status](https://drone.kolaente.de/api/badges/vikunja/app/status.svg)](https://drone.kolaente.de/vikunja/app)
|
[![Build Status](https://drone1.kolaente.de/api/badges/vikunja/app/status.svg)](https://drone1.kolaente.de/vikunja/app)
|
||||||
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
|
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
|
||||||
[![Download](https://img.shields.io/badge/download-v0.1-brightgreen.svg)](https://storage.kolaente.de/minio/vikunja-app/)
|
[![Download](https://img.shields.io/badge/download-v0.1-brightgreen.svg)](https://storage.kolaente.de/minio/vikunja-app/)
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@ class _NamespaceFragmentState extends State<NamespaceFragment> {
|
||||||
: Center(child: CircularProgressIndicator()),
|
: Center(child: CircularProgressIndicator()),
|
||||||
floatingActionButton: Builder(
|
floatingActionButton: Builder(
|
||||||
builder: (context) => FloatingActionButton(
|
builder: (context) => FloatingActionButton(
|
||||||
onPressed: () => _addListDialog(context), child: const Icon(Icons.add))
|
onPressed: () => _addListDialog(context),
|
||||||
),
|
child: const Icon(Icons.add))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ class _ListEditPageState extends State<ListEditPage> {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
decoration:
|
decoration: new InputDecoration(
|
||||||
new InputDecoration(
|
|
||||||
labelText: 'Title',
|
labelText: 'Title',
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
),
|
),
|
||||||
|
@ -74,7 +73,8 @@ class _ListEditPageState extends State<ListEditPage> {
|
||||||
builder: (context) => Padding(
|
builder: (context) => Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.0),
|
padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||||
child: FancyButton(
|
child: FancyButton(
|
||||||
onPressed: !_loading ? () {
|
onPressed: !_loading
|
||||||
|
? () {
|
||||||
if (_formKey.currentState.validate()) {
|
if (_formKey.currentState.validate()) {
|
||||||
Form.of(context).save();
|
Form.of(context).save();
|
||||||
_saveList(context);
|
_saveList(context);
|
||||||
|
@ -84,11 +84,8 @@ class _ListEditPageState extends State<ListEditPage> {
|
||||||
child: _loading
|
child: _loading
|
||||||
? CircularProgressIndicator()
|
? CircularProgressIndicator()
|
||||||
: VikunjaButtonText('Save'),
|
: VikunjaButtonText('Save'),
|
||||||
)
|
))),
|
||||||
)
|
]),
|
||||||
),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -99,23 +96,22 @@ class _ListEditPageState extends State<ListEditPage> {
|
||||||
setState(() => _loading = true);
|
setState(() => _loading = true);
|
||||||
// FIXME: is there a way we can update the list without creating a new list object?
|
// FIXME: is there a way we can update the list without creating a new list object?
|
||||||
// aka updating the existing list we got from context (setters?)
|
// aka updating the existing list we got from context (setters?)
|
||||||
TaskList updatedList = TaskList(
|
TaskList updatedList =
|
||||||
id: widget.list.id, title: _title, description: _description);
|
TaskList(id: widget.list.id, title: _title, description: _description);
|
||||||
|
|
||||||
VikunjaGlobal.of(context).listService.update(updatedList)
|
VikunjaGlobal.of(context).listService.update(updatedList).then((_) {
|
||||||
.then((_) {
|
|
||||||
setState(() => _loading = false);
|
setState(() => _loading = false);
|
||||||
Scaffold.of(context).showSnackBar(SnackBar(
|
Scaffold.of(context).showSnackBar(SnackBar(
|
||||||
content: Text('The list was updated successfully!'),
|
content: Text('The list was updated successfully!'),
|
||||||
));
|
));
|
||||||
})
|
}).catchError((err) {
|
||||||
.catchError((err) {
|
|
||||||
setState(() => _loading = false);
|
setState(() => _loading = false);
|
||||||
Scaffold.of(context).showSnackBar(
|
Scaffold.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text('Something went wrong: ' + err.toString()),
|
content: Text('Something went wrong: ' + err.toString()),
|
||||||
action: SnackBarAction(
|
action: SnackBarAction(
|
||||||
label: 'CLOSE', onPressed: Scaffold.of(context).hideCurrentSnackBar),
|
label: 'CLOSE',
|
||||||
|
onPressed: Scaffold.of(context).hideCurrentSnackBar),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -55,8 +55,8 @@ class _ListPageState extends State<ListPage> {
|
||||||
? RefreshIndicator(
|
? RefreshIndicator(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.0),
|
padding: EdgeInsets.symmetric(vertical: 8.0),
|
||||||
children:
|
children: ListTile.divideTiles(
|
||||||
ListTile.divideTiles(context: context, tiles: _listTasks())
|
context: context, tiles: _listTasks())
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
onRefresh: _loadList,
|
onRefresh: _loadList,
|
||||||
|
|
|
@ -43,12 +43,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
padding: vStandardVerticalPadding,
|
padding: vStandardVerticalPadding,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
enabled: !_loading,
|
enabled: !_loading,
|
||||||
onSaved: (serverAddress) =>
|
onSaved: (serverAddress) => _server = serverAddress,
|
||||||
_server = serverAddress,
|
|
||||||
validator: (address) {
|
validator: (address) {
|
||||||
return isUrl(address)
|
return isUrl(address) ? null : 'Invalid URL';
|
||||||
? null
|
|
||||||
: 'Invalid URL';
|
|
||||||
},
|
},
|
||||||
decoration: new InputDecoration(
|
decoration: new InputDecoration(
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
|
|
|
@ -137,7 +137,9 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => new AlertDialog(
|
builder: (context) => new AlertDialog(
|
||||||
title: Text('Registration failed! Please check your server url and credentials. ' + ex.toString()),
|
title: Text(
|
||||||
|
'Registration failed! Please check your server url and credentials. ' +
|
||||||
|
ex.toString()),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
FlatButton(
|
FlatButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
|
|
|
@ -0,0 +1,232 @@
|
||||||
|
# Generated by pub
|
||||||
|
# See https://www.dartlang.org/tools/pub/glossary#lockfile
|
||||||
|
packages:
|
||||||
|
archive:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: archive
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.8"
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.1"
|
||||||
|
async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: async
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.8"
|
||||||
|
boolean_selector:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: boolean_selector
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
charcode:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: charcode
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: collection
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.14.11"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.6"
|
||||||
|
cupertino_icons:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: cupertino_icons
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.2"
|
||||||
|
dart_config:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
path: "."
|
||||||
|
ref: HEAD
|
||||||
|
resolved-ref: a7ed88a4793e094a4d5d5c2d88a89e55510accde
|
||||||
|
url: "https://github.com/MarkOSullivan94/dart_config.git"
|
||||||
|
source: git
|
||||||
|
version: "0.5.0"
|
||||||
|
flutter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
flutter_launcher_icons:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: flutter_launcher_icons
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.1"
|
||||||
|
flutter_secure_storage:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_secure_storage
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
|
flutter_test:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
http:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: http
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.0"
|
||||||
|
http_parser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_parser
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.3"
|
||||||
|
image:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.7"
|
||||||
|
matcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: matcher
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.3+1"
|
||||||
|
meta:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: meta
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.6"
|
||||||
|
path:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.6.2"
|
||||||
|
petitparser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: petitparser
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
quiver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: quiver
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
|
sky_engine:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.99"
|
||||||
|
source_span:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_span
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.1"
|
||||||
|
stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stack_trace
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.9.3"
|
||||||
|
stream_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_channel
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.6.8"
|
||||||
|
string_scanner:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: string_scanner
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
term_glyph:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: term_glyph
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
|
test_api:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_api
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.6"
|
||||||
|
vector_math:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_math
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.8"
|
||||||
|
xml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xml
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.3.1"
|
||||||
|
yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yaml
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.15"
|
||||||
|
sdks:
|
||||||
|
dart: ">=2.0.0 <3.0.0"
|
Reference in New Issue