From 8be0b36d23fd5c8e07f8bf538ea478ceecabca75 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Thu, 8 Jun 2023 16:01:09 +0200 Subject: [PATCH] signing --- .gitignore | 2 ++ android/app/build.gradle | 17 ++++++++++++++++- lib/browse.dart | 3 ++- lib/main.dart | 2 +- lib/test.dart | 1 + 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 24476c5..4401312 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,5 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +/key \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 3f90628..54634ce 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -51,11 +51,26 @@ android { versionName flutterVersionName } + def keystoreProperties = new Properties() + def keystorePropertiesFile = rootProject.file('key.properties') + if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + } + + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release } } } diff --git a/lib/browse.dart b/lib/browse.dart index ede87e8..8bfbc96 100644 --- a/lib/browse.dart +++ b/lib/browse.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:ju_learn/main.dart'; +// ignore: must_be_immutable class QuizPageBrowse extends StatefulWidget { Vault v; QuizPageBrowse(this.v, {super.key}); @@ -22,7 +23,7 @@ class _QuizPageBrowseState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Testing: ${v.name}'), + title: Text('Browsing: ${v.name}'), ), body: Padding( padding: const EdgeInsets.all(16.0), diff --git a/lib/main.dart b/lib/main.dart index 922bb29..28f6aa0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -108,7 +108,7 @@ class MainPageState extends State { ListTile( leading: const Icon(Icons.book_online), title: const Text("Browse"), - subtitle: const Text("Browse to all Questions!"), + subtitle: const Text("Browse through all Questions!"), trailing: const Icon(Icons.chevron_right), onTap: () { Navigator.push( diff --git a/lib/test.dart b/lib/test.dart index ae33e85..263af7d 100644 --- a/lib/test.dart +++ b/lib/test.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:ju_learn/main.dart'; +// ignore: must_be_immutable class QuizPageTest extends StatefulWidget { Vault v; QuizPageTest(this.v, {super.key});