diff --git a/bin/client_test.dart b/bin/client_test.dart index 3fed86a..5d5aa92 100644 --- a/bin/client_test.dart +++ b/bin/client_test.dart @@ -1,7 +1,7 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/packets/packets.dart'; +import 'package:libac_dart/nbt/Stream.dart'; +import 'package:libac_dart/nbt/Tag.dart'; +import 'package:libac_dart/nbt/impl/CompoundTag.dart'; +import 'package:libac_dart/packets/packets.dart'; void main() async { PacketRegistry reg = PacketRegistry(); diff --git a/bin/server_test.dart b/bin/server_test.dart index 51d11bb..85e65b7 100644 --- a/bin/server_test.dart +++ b/bin/server_test.dart @@ -1,4 +1,4 @@ -import 'package:libac_flutter/packets/packets.dart'; +import 'package:libac_dart/packets/packets.dart'; void main() async { await PacketServer.start(); diff --git a/lib/nbt/NbtIo.dart b/lib/nbt/NbtIo.dart index cdcb537..f0ab573 100644 --- a/lib/nbt/NbtIo.dart +++ b/lib/nbt/NbtIo.dart @@ -1,9 +1,9 @@ import 'dart:typed_data'; -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/utils/Converter.dart'; +import '../utils/Converter.dart'; +import 'Stream.dart'; +import 'Tag.dart'; +import 'impl/CompoundTag.dart'; class NbtIo { static ByteLayer _io = ByteLayer(); diff --git a/lib/nbt/NbtUtils.dart b/lib/nbt/NbtUtils.dart index 8c2cd76..d69170f 100644 --- a/lib/nbt/NbtUtils.dart +++ b/lib/nbt/NbtUtils.dart @@ -1,13 +1,12 @@ -import 'package:libac_flutter/nbt/impl/ByteTag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/nbt/impl/DoubleTag.dart'; -import 'package:libac_flutter/nbt/impl/IntArrayTag.dart'; -import 'package:libac_flutter/nbt/impl/IntTag.dart'; -import 'package:libac_flutter/nbt/impl/ListTag.dart'; -import 'package:libac_flutter/utils/Vector3.dart'; - import '../utils/Vector2.dart'; +import '../utils/Vector3.dart'; import '../utils/uuid/NbtUUID.dart'; +import 'impl/ByteTag.dart'; +import 'impl/CompoundTag.dart'; +import 'impl/DoubleTag.dart'; +import 'impl/IntArrayTag.dart'; +import 'impl/IntTag.dart'; +import 'impl/ListTag.dart'; class NbtUtils { static void writeBoolean(CompoundTag tag, String name, bool b) { diff --git a/lib/nbt/SnbtIo.dart b/lib/nbt/SnbtIo.dart index 6d39f37..b59f40f 100644 --- a/lib/nbt/SnbtIo.dart +++ b/lib/nbt/SnbtIo.dart @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; +import 'Stream.dart'; +import 'Tag.dart'; +import 'impl/CompoundTag.dart'; class SnbtIo { static void write(String file, CompoundTag tag) { diff --git a/lib/nbt/Tag.dart b/lib/nbt/Tag.dart index 8caaa5e..ca0b4a6 100644 --- a/lib/nbt/Tag.dart +++ b/lib/nbt/Tag.dart @@ -1,17 +1,16 @@ -import 'package:libac_flutter/nbt/impl/ByteArrayTag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/nbt/impl/DoubleTag.dart'; -import 'package:libac_flutter/nbt/impl/EndTag.dart'; -import 'package:libac_flutter/nbt/impl/FloatTag.dart'; -import 'package:libac_flutter/nbt/impl/IntArrayTag.dart'; -import 'package:libac_flutter/nbt/impl/IntTag.dart'; -import 'package:libac_flutter/nbt/impl/LongTag.dart'; -import 'package:libac_flutter/nbt/impl/ShortTag.dart'; - import 'Stream.dart'; +import 'impl/ByteArrayTag.dart'; import 'impl/ByteTag.dart'; +import 'impl/CompoundTag.dart'; +import 'impl/DoubleTag.dart'; +import 'impl/EndTag.dart'; +import 'impl/FloatTag.dart'; +import 'impl/IntArrayTag.dart'; +import 'impl/IntTag.dart'; import 'impl/ListTag.dart'; import 'impl/LongArrayTag.dart'; +import 'impl/LongTag.dart'; +import 'impl/ShortTag.dart'; import 'impl/StringTag.dart'; enum TagType { diff --git a/lib/nbt/impl/ByteArrayTag.dart b/lib/nbt/impl/ByteArrayTag.dart index bb62a6d..c80ef47 100644 --- a/lib/nbt/impl/ByteArrayTag.dart +++ b/lib/nbt/impl/ByteArrayTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class ByteArrayTag extends Tag { final List value = []; diff --git a/lib/nbt/impl/ByteTag.dart b/lib/nbt/impl/ByteTag.dart index 68f3ed7..a52738b 100644 --- a/lib/nbt/impl/ByteTag.dart +++ b/lib/nbt/impl/ByteTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class ByteTag extends Tag { int value = 0; diff --git a/lib/nbt/impl/CompoundTag.dart b/lib/nbt/impl/CompoundTag.dart index f552583..88bcdac 100644 --- a/lib/nbt/impl/CompoundTag.dart +++ b/lib/nbt/impl/CompoundTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class CompoundTag extends Tag implements Map { late final Map value = {}; diff --git a/lib/nbt/impl/DoubleTag.dart b/lib/nbt/impl/DoubleTag.dart index 3881473..a2ec956 100644 --- a/lib/nbt/impl/DoubleTag.dart +++ b/lib/nbt/impl/DoubleTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class DoubleTag extends Tag { double value = 0.0; diff --git a/lib/nbt/impl/EndTag.dart b/lib/nbt/impl/EndTag.dart index 50429fd..1e7d0e3 100644 --- a/lib/nbt/impl/EndTag.dart +++ b/lib/nbt/impl/EndTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class EndTag extends Tag { EndTag(); diff --git a/lib/nbt/impl/FloatTag.dart b/lib/nbt/impl/FloatTag.dart index 7b6ffc4..f037d01 100644 --- a/lib/nbt/impl/FloatTag.dart +++ b/lib/nbt/impl/FloatTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class FloatTag extends Tag { double value = 0.0; diff --git a/lib/nbt/impl/IntArrayTag.dart b/lib/nbt/impl/IntArrayTag.dart index d015351..009a02e 100644 --- a/lib/nbt/impl/IntArrayTag.dart +++ b/lib/nbt/impl/IntArrayTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class IntArrayTag extends Tag { final List value = []; diff --git a/lib/nbt/impl/IntTag.dart b/lib/nbt/impl/IntTag.dart index 067c517..429d9a6 100644 --- a/lib/nbt/impl/IntTag.dart +++ b/lib/nbt/impl/IntTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class IntTag extends Tag { int value = 0; diff --git a/lib/nbt/impl/ListTag.dart b/lib/nbt/impl/ListTag.dart index d908226..ee8d5f4 100644 --- a/lib/nbt/impl/ListTag.dart +++ b/lib/nbt/impl/ListTag.dart @@ -1,6 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; - +import '../Stream.dart'; +import '../Tag.dart'; import 'EndTag.dart'; class ListTag extends Tag { diff --git a/lib/nbt/impl/LongArrayTag.dart b/lib/nbt/impl/LongArrayTag.dart index 8984cf4..d517438 100644 --- a/lib/nbt/impl/LongArrayTag.dart +++ b/lib/nbt/impl/LongArrayTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class LongArrayTag extends Tag { final List value = []; diff --git a/lib/nbt/impl/LongTag.dart b/lib/nbt/impl/LongTag.dart index 6f1d90e..89ac809 100644 --- a/lib/nbt/impl/LongTag.dart +++ b/lib/nbt/impl/LongTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class LongTag extends Tag { int value = 0; diff --git a/lib/nbt/impl/ShortTag.dart b/lib/nbt/impl/ShortTag.dart index 9642295..13ed6aa 100644 --- a/lib/nbt/impl/ShortTag.dart +++ b/lib/nbt/impl/ShortTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class ShortTag extends Tag { int value = 0; diff --git a/lib/nbt/impl/StringTag.dart b/lib/nbt/impl/StringTag.dart index e6cf258..4829e31 100644 --- a/lib/nbt/impl/StringTag.dart +++ b/lib/nbt/impl/StringTag.dart @@ -1,5 +1,5 @@ -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; +import '../Stream.dart'; +import '../Tag.dart'; class StringTag extends Tag { String value = ""; diff --git a/lib/packets/packets.dart b/lib/packets/packets.dart index b7c89d3..a60d1a5 100644 --- a/lib/packets/packets.dart +++ b/lib/packets/packets.dart @@ -2,12 +2,11 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:libac_flutter/nbt/NbtIo.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/nbt/impl/StringTag.dart'; - +import '../nbt/NbtIo.dart'; import '../nbt/Stream.dart'; +import '../nbt/Tag.dart'; +import '../nbt/impl/CompoundTag.dart'; +import '../nbt/impl/StringTag.dart'; class PacketServer { static ServerSocket? socket; diff --git a/lib/utils/TimeUtils.dart b/lib/utils/TimeUtils.dart index 6778cba..5b715b2 100644 --- a/lib/utils/TimeUtils.dart +++ b/lib/utils/TimeUtils.dart @@ -1,4 +1,4 @@ -import 'package:libac_flutter/nbt/Stream.dart'; +import '../nbt/Stream.dart'; class Time { int hours; diff --git a/lib/utils/uuid/NbtUUID.dart b/lib/utils/uuid/NbtUUID.dart index af766e8..306b757 100644 --- a/lib/utils/uuid/NbtUUID.dart +++ b/lib/utils/uuid/NbtUUID.dart @@ -1,5 +1,4 @@ -import 'package:libac_flutter/nbt/Stream.dart'; - +import '../../nbt/Stream.dart'; import 'UUID.dart'; class NbtUUID { diff --git a/lib/utils/uuid/UUID.dart b/lib/utils/uuid/UUID.dart index 5f4fdc7..9858cb0 100644 --- a/lib/utils/uuid/UUID.dart +++ b/lib/utils/uuid/UUID.dart @@ -2,7 +2,8 @@ import 'dart:convert'; import 'dart:math'; import 'package:crypto/crypto.dart'; -import 'package:libac_flutter/nbt/Stream.dart'; + +import '../../nbt/Stream.dart'; class UUID { late final List _bytes; diff --git a/pubspec.yaml b/pubspec.yaml index 856b5c7..fdd6f7a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,28 +1,23 @@ -name: libac_flutter +name: libac_dart description: "Aria's Creations code library" version: 1.0.20 homepage: "https://zontreck.com" -environment: - sdk: '>=3.3.4 <4.0.0' - flutter: ">=1.17.0" +environment: + sdk: ^3.4.0 + +# Add regular dependencies here. dependencies: - crypto: ^3.0.3 - flutter: - sdk: flutter +# path: ^1.8.0 dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^3.0.0 + lints: ^3.0.0 + test: ^1.24.0 + -# For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec -# The following section is specific to Flutter packages. -flutter: - uses-material-design: true # To add assets to your package, add an assets section, like this: # assets: diff --git a/test/hash_test.dart b/test/hash_test.dart index 7243f1e..9539fa7 100644 --- a/test/hash_test.dart +++ b/test/hash_test.dart @@ -1,5 +1,6 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:libac_flutter/utils/Hashing.dart'; +import 'package:libac_dart/utils/Hashing.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; void main() { test("Test md5", () { diff --git a/test/nbt_test.dart b/test/nbt_test.dart index 2930c57..69273f7 100644 --- a/test/nbt_test.dart +++ b/test/nbt_test.dart @@ -1,15 +1,16 @@ import 'dart:io'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:libac_flutter/nbt/NbtIo.dart'; -import 'package:libac_flutter/nbt/NbtUtils.dart'; -import 'package:libac_flutter/nbt/SnbtIo.dart'; -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/nbt/Tag.dart'; -import 'package:libac_flutter/nbt/impl/CompoundTag.dart'; -import 'package:libac_flutter/nbt/impl/StringTag.dart'; -import 'package:libac_flutter/utils/uuid/NbtUUID.dart'; -import 'package:libac_flutter/utils/uuid/UUID.dart'; +import 'package:libac_dart/nbt/NbtIo.dart'; +import 'package:libac_dart/nbt/NbtUtils.dart'; +import 'package:libac_dart/nbt/SnbtIo.dart'; +import 'package:libac_dart/nbt/Stream.dart'; +import 'package:libac_dart/nbt/Tag.dart'; +import 'package:libac_dart/nbt/impl/CompoundTag.dart'; +import 'package:libac_dart/nbt/impl/StringTag.dart'; +import 'package:libac_dart/utils/uuid/NbtUUID.dart'; +import 'package:libac_dart/utils/uuid/UUID.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; void main() { test('read non-compressed helloworld NBT', () async { diff --git a/test/time_test.dart b/test/time_test.dart index 91eba61..ff52ff4 100644 --- a/test/time_test.dart +++ b/test/time_test.dart @@ -1,5 +1,6 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:libac_flutter/utils/TimeUtils.dart'; +import 'package:libac_dart/utils/TimeUtils.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; void main() { test("Parse time notation", () { diff --git a/test/uuid_test.dart b/test/uuid_test.dart index 16467fb..086563c 100644 --- a/test/uuid_test.dart +++ b/test/uuid_test.dart @@ -1,6 +1,7 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:libac_flutter/nbt/Stream.dart'; -import 'package:libac_flutter/utils/uuid/UUID.dart'; +import 'package:libac_dart/nbt/Stream.dart'; +import 'package:libac_dart/utils/uuid/UUID.dart'; +import 'package:test/expect.dart'; +import 'package:test/scaffolding.dart'; void main() { test("Store a 64bit value in int", () {