Skip to content

Commit 191d8ae

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # build.gradle
2 parents 183ea0b + 3538d42 commit 191d8ae

File tree

11 files changed

+54
-38
lines changed

11 files changed

+54
-38
lines changed

.idea/modules.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/kotlin-unsigned.iml

Lines changed: 31 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,26 @@
1-
apply plugin: 'maven'
2-
apply plugin: 'kotlin'
3-
4-
apply plugin: 'com.github.johnrengelman.shadow'
5-
6-
ext.moduleName = 'com.github.kotlin_graphics.kotlin_unsigned'
7-
8-
buildscript {
9-
10-
ext.kotlinVersion = '1.3.11'
1+
plugins {
2+
id 'maven'
3+
id "org.jetbrains.kotlin.jvm" version "1.3.10"
4+
id "com.github.johnrengelman.shadow" version '2.0.4'
5+
}
116

12-
repositories {
13-
jcenter() // shadow
14-
mavenCentral()
15-
maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" }
16-
}
17-
dependencies {
18-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion".toString()
19-
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
20-
classpath "org.junit.platform:junit-platform-gradle-plugin:1.2.0"
21-
}
7+
ext{
8+
moduleName = 'com.github.kotlin_graphics.kotlin_unsigned'
9+
kotlintest_version = '3.1.10'
2210
}
2311

2412
dependencies {
2513

26-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion".toString()
14+
implementation "org.jetbrains.kotlin:kotlin-stdlib"
2715

28-
testImplementation 'io.kotlintest:kotlintest-runner-junit5:3.1.11'
16+
testImplementation "io.kotlintest:kotlintest-runner-junit5:$kotlintest_version".toString()
2917
}
3018

3119
repositories {
3220
mavenCentral()
33-
maven { url = "https://dl.bintray.com/kotlin/kotlin-eap" }
3421
maven { url = "https://jitpack.io" }
3522
}
3623

37-
38-
allprojects {
39-
sourceCompatibility = 1.7
40-
targetCompatibility = 1.7
41-
}
42-
43-
4424
task sourcesJar(type: Jar, dependsOn: classes) {
4525
classifier = 'sources'
4626
from sourceSets.main.allSource
@@ -59,4 +39,8 @@ artifacts {
5939
jar {
6040
inputs.property("moduleName", moduleName)
6141
manifest.attributes('Automatic-Module-Name': moduleName)
42+
}
43+
44+
test {
45+
useJUnitPlatform()
6246
}

gradle/wrapper/gradle-wrapper.jar

1.01 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Dec 17 10:10:22 CET 2017
1+
#Tue Nov 27 10:15:46 CET 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

src/main/kotlin/unsigned/Ubyte.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,6 @@ class Ubyte(var v: Byte) : Number() {
9696
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9797

9898
override fun toString() = toInt().toString()
99+
100+
override fun equals(other: Any?) = other is Ubyte && v == other.v
99101
}

src/main/kotlin/unsigned/Uint.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ data class Uint(var v: Int = 0) : Number() {
7979

8080
override fun toString() = toLong().toString()
8181

82+
override fun equals(other: Any?) = other is Uint && v == other.v
8283
// TODO long?
8384
}

src/main/kotlin/unsigned/Ulong.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ data class Ulong(var v: Long = 0) : Number(), Comparable<Ulong> {
7474
// TODO others
7575

7676
override fun toString() = toBigInt().toString()
77+
override fun equals(other: Any?) = other is Ulong && v == other.v
7778

7879
operator fun rangeTo(b: Ulong) = UlongRange(this, b)
7980

src/main/kotlin/unsigned/Ushort.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ data class Ushort(var v: Short = 0) : Number() {
9393
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9494

9595
override fun toString() = toInt().toString()
96+
override fun equals(other: Any?) = other is Ushort && v == other.v
9697
}

0 commit comments

Comments
 (0)