Skip to content

Commit

Permalink
kotlinbukkit 1.0.0-rc.6 - Kotlin 1.3.30 and more
Browse files Browse the repository at this point in the history
  • Loading branch information
finalchild committed Jan 3, 2020
1 parent b086ace commit 9cc0212
Show file tree
Hide file tree
Showing 22 changed files with 69 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .bintraydescriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"subject": "finalchild"
},
"version": {
"name": "1.0.0-rc.5",
"name": "1.0.0-rc.6",
"gpgSign": true
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- openjdk11
- openjdk12
before_deploy: "./gradlew prepareUpload"
deploy:
- provider: releases
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,15 +15,15 @@
*/

plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'org.jetbrains.kotlin.jvm' version '1.3.30'
id 'com.github.johnrengelman.shadow' version '5.0.0'
id 'java-library'
id 'maven'
id 'maven-publish'
}

group 'me.finalchild'
version '1.0.0-rc.5'
version '1.0.0-rc.6'

description 'Provides Kotlin stdlib and extensions to Bukkit plugins.'

Expand All @@ -46,7 +46,7 @@ dependencies {
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8'
}

sourceCompatibility = 11
sourceCompatibility = 12

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
Expand Down Expand Up @@ -95,7 +95,7 @@ shadowJar {
exclude dependency(group: 'org.ow2.asm', name: 'asm-tree')
exclude dependency(group: 'org.ow2.asm', name: 'asm')
}
classifier = 'uber'
archiveClassifier = 'uber'
}

task sourcesJar(type: Jar) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 17 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

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

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/finalchild/kotlinbukkit/KotlinBukkit.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,7 @@ import org.bukkit.attribute.AttributeModifier
* @param attribute the attribute to get
* @return the attribute instance or null if not applicable to this object
*/
operator fun Attributable.get(attribute: Attribute): AttributeInstance = getAttribute(attribute)
operator fun Attributable.get(attribute: Attribute): AttributeInstance? = getAttribute(attribute)

/**
* Add a modifier to this instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,7 @@ var ItemStack.displayName: String?
set(name) {
val itemMeta = this.itemMeta
if (itemMeta != null) {
itemMeta.displayName = name
itemMeta.setDisplayName(name)
this.itemMeta = itemMeta
} else {
throw UnsupportedOperationException("No ItemMeta for the item ${this} found.")
Expand All @@ -57,7 +57,7 @@ var ItemStack.name: String?
set(name) {
val itemMeta = this.itemMeta
if (itemMeta != null) {
itemMeta.displayName = name
itemMeta.setDisplayName(name)
this.itemMeta = itemMeta
} else {
throw UnsupportedOperationException("No ItemMeta for the item ${this} found.")
Expand All @@ -79,7 +79,7 @@ var ItemStack.localizedName: String?
set(name) {
val itemMeta = this.itemMeta
if (itemMeta != null) {
itemMeta.localizedName = name
itemMeta.setLocalizedName(name)
this.itemMeta = itemMeta
} else {
throw UnsupportedOperationException("No ItemMeta for the item ${this} found.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/finalchild/kotlinbukkit/util/Util.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
16 changes: 8 additions & 8 deletions src/main/kotlin/me/finalchild/kotlinbukkit/util/VectorUtil.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,16 +18,16 @@ package me.finalchild.kotlinbukkit.util

import org.bukkit.util.Vector

operator fun Vector.plus(b: Vector) = clone().add(b)!!
operator fun Vector.minus(b: Vector) = clone().subtract(b)!!
operator fun Vector.plus(b: Vector) = clone().add(b)
operator fun Vector.minus(b: Vector) = clone().subtract(b)

operator fun Vector.unaryPlus() = clone()
operator fun Vector.unaryMinus() = clone().multiply(-1)!!
operator fun Vector.unaryMinus() = clone().multiply(-1)

operator fun Vector.times(b: Int) = clone().multiply(b)!!
operator fun Vector.times(b: Float) = clone().multiply(b)!!
operator fun Vector.times(b: Double) = clone().multiply(b)!!
operator fun Vector.times(b: Vector) = clone().multiply(b)!!
operator fun Vector.times(b: Int) = clone().multiply(b)
operator fun Vector.times(b: Float) = clone().multiply(b)
operator fun Vector.times(b: Double) = clone().multiply(b)
operator fun Vector.times(b: Vector) = clone().multiply(b)

operator fun Vector.component1() = x
operator fun Vector.component2() = y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 Bak Jaeon (finalchild) and Ranol
* Copyright 2017-2019 Bak Jaeon (finalchild) and Ranol
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 9cc0212

Please sign in to comment.