Skip to content

Commit 2617497

Browse files
committed
merge main
2 parents 6cafff3 + 7a8379f commit 2617497

File tree

107 files changed

+2538
-2625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+2538
-2625
lines changed

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.29.2"
3+
}

.github/workflows/flutterci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ jobs:
1717
steps:
1818
# Step 1: Checkout the repository
1919
- uses: actions/checkout@v2
20-
20+
2121
# Step 2: Setup Java with version 12.x
2222
- uses: actions/setup-java@v1
2323
with:
24-
java-version: '12.x'
25-
24+
java-version: "17.x"
25+
2626
# Step 3: Setup Flutter with version 3.7.11
2727
- uses: subosito/flutter-action@v1
2828
with:
29-
flutter-version: '3.22.1'
30-
29+
flutter-version: "3.29.2"
30+
3131
# Step 4: Get dependencies using pub get
3232
- run: flutter pub get
33-
33+
3434
# Step 5: Analyze the code using flutter analyze
35-
- run: flutter analyze
36-
35+
- run: flutter analyze --no-fatal-warnings --no-fatal-infos
36+
3737
# Step 6: Format the code using flutter format (uncomment if needed)
3838
# - run: flutter format -n --set-exit-if-changed .
39-
39+
4040
# Step 7: Run tests using flutter test
41-
- run: flutter test
42-
41+
# - run: flutter test
42+
4343
# Step 8: Build APK using flutter build apk
4444
- run: flutter build apk
45-
45+
4646
# Step 9: Upload the built APK as an artifact
47-
- uses: actions/upload-artifact@v3
47+
- uses: actions/upload-artifact@v4
4848
with:
4949
name: release-apk
5050
path: build/app/outputs/apk/release/app-release.apk

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
**/.cxx/
1112

1213
# IntelliJ related
1314
*.iml
@@ -44,3 +45,6 @@ app.*.map.json
4445
/android/app/debug
4546
/android/app/profile
4647
/android/app/release
48+
49+
# FVM Version Cache
50+
.fvm/

.vscode/settings.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
2-
// "editor.minimap.enabled": false,
3-
"html.format.wrapAttributesIndentSize": 4,
4-
"[dart]": {
5-
"editor.tabSize": 4,
6-
"editor.insertSpaces": false,
7-
"editor.detectIndentation": true,
8-
"editor.suggest.insertMode": "replace",
9-
"editor.formatOnSave": true
10-
},
11-
"editor.formatOnSave": true,
12-
"editor.insertSpaces": false,
13-
"editor.detectIndentation": false,
14-
"editor.tabSize": 4,
15-
"editor.codeActionsOnSave": {
16-
"source.fixAll": "explicit"
17-
}
2+
"html.format.wrapAttributesIndentSize": 4,
3+
"[dart]": {
4+
"editor.tabSize": 4,
5+
"editor.insertSpaces": false,
6+
"editor.detectIndentation": true,
7+
"editor.suggest.insertMode": "replace",
8+
"editor.formatOnSave": true
9+
},
10+
"editor.formatOnSave": true,
11+
"editor.insertSpaces": false,
12+
"editor.detectIndentation": false,
13+
"editor.tabSize": 4,
14+
"editor.codeActionsOnSave": {
15+
"source.fixAll": "explicit"
16+
},
17+
"java.configuration.updateBuildConfiguration": "interactive",
18+
"dart.flutterSdkPath": ".fvm/versions/3.29.2"
1819
}

CONTRIBUTING.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ flutter doctor
3535
flutter pub get
3636
```
3737

38-
%. Run the app:
38+
5. Run the app:
3939

4040
```bash
4141
flutter run
@@ -60,9 +60,17 @@ ___
6060
## Contributing
6161

6262
1. Fork the Project
63-
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
64-
2. Create your Fix Branch (`git checkout -b fix/BugFix`)
65-
3. Add all files(`git add .`)
66-
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
67-
4. Push to the Branch (`git push origin feature/AmazingFeature`)
68-
5. Open a Pull Request in the **develop branch**
63+
2. Clone the Forked Repo. `git clone https://github.com/[username]/taskwarrior-flutter.git`
64+
3. Create a branch
65+
- For your Feature Branch (`git checkout -b feature/AmazingFeature`)
66+
- For your Fix Branch (`git checkout -b fix/BugFix`)
67+
4. Do the changes in that branch
68+
5. Add all files (`git add .`)
69+
- Do Not add files generated by code editor of Android Studio IDE
70+
- Only add files that related to your feature
71+
6. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
72+
7. Make sure branch is synced with main branch of `CCExtractor/taskwarrior-flutter`
73+
- If not, please sync it and test again
74+
- If any conflict, resolve according to feature and test again
75+
7. Push to the Branch (`git push origin feature/AmazingFeature`)
76+
8. Open a Pull Request for the `main` branch.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This project aims to build an app for Taskwarrior. It is your task management ap
9191
1. Clone the repository from GitHub:
9292

9393
```bash
94-
git clone https://github.com/NishantSinghal19/taskwarrior-flutter.git
94+
git clone https://github.com/CCExtractor/taskwarrior-flutter
9595
```
9696

9797
2. Navigate to the project's root directory:

android/app/build.gradle

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
6+
17
def localProperties = new Properties()
28
def localPropertiesFile = rootProject.file('local.properties')
39
if (localPropertiesFile.exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612
}
713
}
814

9-
def flutterRoot = localProperties.getProperty('flutter.sdk')
10-
if (flutterRoot == null) {
11-
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12-
}
13-
1415
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1516
if (flutterVersionCode == null) {
1617
flutterVersionCode = '1'
@@ -21,16 +22,14 @@ if (flutterVersionName == null) {
2122
flutterVersionName = '1.0'
2223
}
2324

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2725
def keystoreProperties = new Properties()
2826
def keystorePropertiesFile = rootProject.file('key.properties')
2927
if (keystorePropertiesFile.exists()) {
3028
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
3129
}
3230
android {
33-
compileSdkVersion 34
31+
namespace "com.ccextractor.taskwarriorflutter"
32+
compileSdkVersion 35
3433

3534
// compileSdkVersion flutter.compileSdkVersion
3635

@@ -78,5 +77,5 @@ flutter {
7877
}
7978

8079
dependencies {
81-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
80+
8281
}

android/app/src/main/AndroidManifest.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<action android:name="es.antonborri.home_widget.action.LAUNCH" />
3737
</intent-filter>
3838
</activity>
39+
3940
<receiver android:name="TaskWarriorWidgetProvider"
4041
android:exported="true">
4142
<intent-filter>
@@ -44,6 +45,22 @@
4445
<meta-data android:name="android.appwidget.provider"
4546
android:resource="@xml/taskwarriorconfig" />
4647
</receiver>
48+
49+
<receiver android:name=".WidgetUpdateReceiver"
50+
android:exported="true">
51+
<intent-filter>
52+
<action android:name="UPDATE_WIDGET" />
53+
</intent-filter>
54+
</receiver>
55+
56+
<receiver android:name=".BurndownChartProvider"
57+
android:exported="true">
58+
<intent-filter>
59+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
60+
</intent-filter>
61+
<meta-data android:name="android.appwidget.provider"
62+
android:resource="@xml/burndownchartconfig" />
63+
</receiver>
4764

4865
<!-- Used for Background Work -->
4966
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.ccextractor.taskwarriorflutter
2+
3+
import android.appwidget.AppWidgetManager
4+
import android.content.Context
5+
import android.content.SharedPreferences
6+
import es.antonborri.home_widget.HomeWidgetProvider
7+
8+
class BurndownChartProvider : HomeWidgetProvider() {
9+
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray, widgetData: SharedPreferences) {
10+
// This method is intentionally left blank.
11+
// Widget updates are handled by WidgetUpdateReceiver.
12+
}
13+
}
Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
package com.ccextractor.taskwarriorflutter
22

3+
import android.content.Intent
4+
import android.os.Bundle
35
import io.flutter.embedding.android.FlutterActivity
6+
import io.flutter.embedding.engine.FlutterEngine
7+
import io.flutter.plugin.common.MethodChannel
8+
import android.content.Context
9+
import android.content.IntentFilter
10+
import android.appwidget.AppWidgetManager
11+
import android.content.ComponentName
412

5-
class MainActivity: FlutterActivity()
13+
class MainActivity: FlutterActivity() {
14+
private val channel = "com.example.taskwarrior/widget"
15+
16+
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
17+
super.configureFlutterEngine(flutterEngine)
18+
19+
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, channel).setMethodCallHandler {
20+
call, result ->
21+
if (call.method == "updateWidget") {
22+
updateWidget()
23+
result.success("Widget updated")
24+
} else {
25+
result.notImplemented()
26+
}
27+
}
28+
}
29+
30+
private fun updateWidget() {
31+
val intent = Intent(this, WidgetUpdateReceiver::class.java).apply {
32+
action = "UPDATE_WIDGET"
33+
}
34+
sendBroadcast(intent)
35+
}
36+
}

0 commit comments

Comments
 (0)