commit 18c6fdb54eac9018801c1f968b109f4449d83e94 Author: Alexander "PapaTutuWawa Date: Thu Jun 30 14:00:18 2022 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b29ed9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build outputs. +build/ + +# Omit committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock + +# NixOS +.direnv +.envrc diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..effe43c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b55e73 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ + + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/example/omemo_dart_example.dart b/example/omemo_dart_example.dart new file mode 100644 index 0000000..0825568 --- /dev/null +++ b/example/omemo_dart_example.dart @@ -0,0 +1,6 @@ +import 'package:omemo_dart/omemo_dart.dart'; + +void main() { + var awesome = Awesome(); + print('awesome: ${awesome.isAwesome}'); +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..758a69a --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1656065134, + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1650015244, + "narHash": "sha256-f6sgDj9A8FXTVyA2zkxA66YX+j6BftxE9VHTeIMhEKE=", + "owner": "PapaTutuWawa", + "repo": "nixpkgs", + "rev": "766f4f20760651ab523e716abe164317445b24ab", + "type": "github" + }, + "original": { + "owner": "PapaTutuWawa", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fc02552 --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + description = "omemo_dart"; + inputs = { + nixpkgs.url = "github:PapaTutuWawa/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + config.android_sdk.accept_license = true; + }; + android = pkgs.androidenv.composeAndroidPackages { + # TODO: Find a way to pin these + #toolsVersion = "26.1.1"; + #platformToolsVersion = "31.0.3"; + #buildToolsVersions = [ "31.0.0" ]; + #includeEmulator = true; + #emulatorVersion = "30.6.3"; + platformVersions = [ "28" ]; + includeSources = false; + includeSystemImages = true; + systemImageTypes = [ "default" ]; + abiVersions = [ "x86_64" ]; + includeNDK = false; + useGoogleAPIs = false; + useGoogleTVAddOns = false; + }; + pinnedJDK = pkgs.jdk11; + in { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + flutter pinnedJDK android.platform-tools dart # Flutter/Android + gitlint jq # Code hygiene + ripgrep # General utilities + ]; + ANDROID_HOME = "${android.androidsdk}/libexec/android-sdk"; + JAVA_HOME = pinnedJDK; + ANDROID_AVD_HOME = (toString ./.) + "/.android/avd"; + }; + }); +} diff --git a/lib/omemo_dart.dart b/lib/omemo_dart.dart new file mode 100644 index 0000000..5d8730f --- /dev/null +++ b/lib/omemo_dart.dart @@ -0,0 +1,8 @@ +/// Support for doing something awesome. +/// +/// More dartdocs go here. +library omemo_dart; + +export 'src/omemo_dart_base.dart'; + +// TODO: Export any libraries intended for clients of this package. diff --git a/lib/src/omemo_dart_base.dart b/lib/src/omemo_dart_base.dart new file mode 100644 index 0000000..e8a6f15 --- /dev/null +++ b/lib/src/omemo_dart_base.dart @@ -0,0 +1,6 @@ +// TODO: Put public facing types in this file. + +/// Checks if you are awesome. Spoiler: you are. +class Awesome { + bool get isAwesome => true; +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..ea09273 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,15 @@ +name: omemo_dart +description: A starting point for Dart libraries or applications. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.15.1 <3.0.0' + + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + lints: ^1.0.0 + test: ^1.16.0 diff --git a/test/omemo_dart_test.dart b/test/omemo_dart_test.dart new file mode 100644 index 0000000..7e298b5 --- /dev/null +++ b/test/omemo_dart_test.dart @@ -0,0 +1,16 @@ +import 'package:omemo_dart/omemo_dart.dart'; +import 'package:test/test.dart'; + +void main() { + group('A group of tests', () { + final awesome = Awesome(); + + setUp(() { + // Additional setup goes here. + }); + + test('First Test', () { + expect(awesome.isAwesome, isTrue); + }); + }); +}