Skip to content

feature: Bump native assets cli and fix bug #26

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions example/dart_package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ start using the package.

## Usage

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
Run binary console command in root folder:

```dart
const like = 'sample';
```sh
dart --enable-experiment=native-assets run bin/dart_package_example.dart
```

## Additional information
Expand Down
4 changes: 2 additions & 2 deletions example/dart_package/hook/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import 'package:native_assets_cli/native_assets_cli.dart';

void main(List<String> args) async {
try {
await build(args, (BuildConfig buildConfig, BuildOutput output) async {
await build(args, (BuildInput input, BuildOutputBuilder output) async {
final builder = RustBuilder(
package: 'dart_package',
cratePath: 'rust',
buildConfig: buildConfig,
buildInput: input,
);
await builder.run(output: output);
});
Expand Down
7 changes: 4 additions & 3 deletions example/dart_package/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ version: 1.0.0
publish_to: none

environment:
sdk: ^3.5.0-90.0.dev
sdk: ^3.5.0

dependencies:
native_toolchain_rust: ^0.1.0-dev.7
native_assets_cli: ^0.7.2
native_toolchain_rust:
path: ../../native_toolchain_rust
native_assets_cli: ^0.12.0

dev_dependencies:
lints: ^3.0.0
Expand Down
27 changes: 6 additions & 21 deletions example/flutter_package/example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,20 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "9689f7f89c9821b344321668fd144bdd6b957d41"
channel: "main"
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
- platform: android
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
- platform: ios
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
- platform: linux
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
- platform: macos
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
- platform: web
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
- platform: windows
create_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
base_revision: 9689f7f89c9821b344321668fd144bdd6b957d41
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a

# User provided section

Expand Down
3 changes: 2 additions & 1 deletion example/flutter_package/example/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java

# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks
app/.cxx
6 changes: 5 additions & 1 deletion example/flutter_package/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ android {
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

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-gradle-build-configuration.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
Expand Down
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.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
4 changes: 2 additions & 2 deletions example/flutter_package/example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}

include ":app"
Loading
Loading