-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Optional automatic `minSdkLevel` check and update (Android) - Updated README - Updated CHANGELOG (uhm... sorry about that 😅)
- Loading branch information
Showing
19 changed files
with
751 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
# 0.1.0+1 | ||
# 0.0.1-dev.1 | ||
|
||
- TODO: Describe initial release. | ||
**🎉 Initial version of freerasp_brick 🎉** | ||
## ✨ Features | ||
- 🛠 Configuration generation | ||
- 🎯 Dependency check using `pub get` | ||
- 🔧 Fix apply using `dart fix` | ||
|
||
# 0.0.1-dev.2 | ||
## ✨ New Features | ||
- Automatic dependency fetching using `pub add` | ||
|
||
## 🎯 Improvements | ||
- Unified CLI prompt design | ||
- Expanded README.md | ||
|
||
## 🛠 Fixed issues | ||
- Typos in README.md | ||
|
||
# 0.0.1-dev.3 | ||
## 🎯 Improvements | ||
- GitHub actions | ||
- Code analysis | ||
|
||
## 🛠 Fixed issues | ||
- Dynamic types | ||
|
||
# 0.0.1-dev.4 | ||
## ✨ New Features | ||
- Optional automatic `minSdkLevel` check and update (Android) | ||
|
||
## 🎯 Improvements | ||
- Updated README | ||
- Updated CHANGELOG (uhm... sorry about that 😅) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'freerasp_brick_exception.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
class FreeRaspBrickException implements Exception { | ||
const FreeRaspBrickException({ | ||
this.code = 'brick-failure', | ||
this.message, | ||
this.stackTrace, | ||
}); | ||
|
||
factory FreeRaspBrickException.wtf({ | ||
StackTrace? stackTrace, | ||
String? message, | ||
}) { | ||
return FreeRaspBrickException( | ||
message: message ?? 'Unexpected error occurred.', | ||
stackTrace: stackTrace, | ||
); | ||
} | ||
|
||
factory FreeRaspBrickException.gradleUpdateFailure({StackTrace? stackTrace}) { | ||
return FreeRaspBrickException( | ||
code: 'gradle-failure', | ||
message: 'Issue occurred during update of gradle file.', | ||
stackTrace: stackTrace, | ||
); | ||
} | ||
|
||
final String code; | ||
final String? message; | ||
final StackTrace? stackTrace; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// coverage:ignore-file | ||
import 'package:mason/mason.dart'; | ||
|
||
extension LoggerX on Logger { | ||
String masonPrompt( | ||
String? message, { | ||
Object? defaultValue, | ||
bool hidden = false, | ||
}) { | ||
return prompt( | ||
'${green.wrap('?')} ${message ?? ''}', | ||
defaultValue: defaultValue, | ||
hidden: hidden, | ||
); | ||
} | ||
|
||
bool masonConfirm( | ||
String? message, { | ||
bool defaultValue = false, | ||
}) { | ||
return confirm( | ||
'${green.wrap('?')} ${message ?? ''}', | ||
defaultValue: defaultValue, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export 'invalid/missing_key.dart'; | ||
export 'invalid/missing_value.dart'; | ||
export 'valid/supported_build.dart'; | ||
export 'valid/value_build.dart'; | ||
export 'valid/variable_build.dart'; |
72 changes: 72 additions & 0 deletions
72
hooks/test/test_inputs/gradle_files/invalid/missing_key.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
const missingKeyGradle = r''' | ||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
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' | ||
} | ||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" | ||
android { | ||
compileSdkVersion flutter.compileSdkVersion | ||
ndkVersion flutter.ndkVersion | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
defaultConfig { | ||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||
applicationId "com.example.example" | ||
// You can update the following values to match your application needs. | ||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. | ||
targetSdkVersion flutter.targetSdkVersion | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
} | ||
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 | ||
} | ||
} | ||
} | ||
flutter { | ||
source '../..' | ||
} | ||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
} | ||
'''; |
Oops, something went wrong.