Updated version

connection_type_change
Robinson 2021-04-29 01:32:51 +02:00
parent 88afd48b8c
commit 614fc0f637
23 changed files with 30 additions and 43 deletions

View File

@ -21,7 +21,7 @@ Maven Info
<dependency>
<groupId>com.dorkbox</groupId>
<artifactId>NetworkUtils</artifactId>
<version>2.6</version>
<version>2.7</version>
</dependency>
</dependencies>
```
@ -30,7 +30,7 @@ Gradle Info
```
dependencies {
...
implementation("com.dorkbox:NetworkUtils:2.6")
implementation("com.dorkbox:NetworkUtils:2.7")
}
```

View File

@ -32,14 +32,14 @@ plugins {
id("com.dorkbox.VersionUpdate") version "2.3"
id("com.dorkbox.GradlePublish") version "1.11"
kotlin("jvm") version "1.4.32"
kotlin("jvm") version "1.5.0"
}
object Extras {
// set for the project
const val description = "Utilities for managing network configurations, IP/MAC address conversion, and ping (via OS native commands)"
const val group = "com.dorkbox"
const val version = "2.6"
const val version = "2.7"
// set as project.ext
const val name = "NetworkUtils"
@ -56,7 +56,9 @@ object Extras {
///////////////////////////////
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
GradleUtils.defaults()
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8) {
freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
GradleUtils.jpms(JavaVersion.VERSION_1_9)
licensing {

2
gradlew vendored
View File

@ -130,7 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath

21
gradlew.bat vendored
View File

@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -64,21 +64,6 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell

View File

@ -7,7 +7,7 @@ object Arp {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
// Now setup ARP Proxy for this interface (so ARP requests are answered correctly)
fun proxyAdd(interfaceName: String) {

View File

@ -15,7 +15,7 @@ internal object Common {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
val OS_LINUX: Boolean
val OS_WINDOWS: Boolean

View File

@ -10,7 +10,7 @@ object Dhcp {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
fun start(id: String, interfaceName: String) {
if (Common.OS_LINUX) {

View File

@ -18,7 +18,7 @@ object Dns {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
const val DEFAULT_SEARCH_DOMAIN = ""

View File

@ -20,7 +20,7 @@ object IP {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
/**
* The [InetAddress] that represents the loopback address. If IPv6 stack is available, it will refer to

View File

@ -10,7 +10,7 @@ object IPRoute {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
private val reservedTable = StringBuilder(2048)
private val tableNames: MutableMap<Int, String?> = HashMap(256)

View File

@ -38,7 +38,7 @@ object IPv4 {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
/**
* Returns `true` if IPv4 should be used even if the system supports both IPv4 and IPv6. Setting this

View File

@ -33,7 +33,7 @@ object IPv6 {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
// used for subnet mask info
private val MINUS_ONE = BigInteger.valueOf(-1)

View File

@ -9,7 +9,7 @@ object IfConfig {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
fun assignMac(interfaceName: String, interfaceMac: String) {
if (Common.OS_LINUX) {

View File

@ -9,7 +9,7 @@ object Iface {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
private val ifToIp: MutableMap<String, String> = HashMap()

View File

@ -24,7 +24,7 @@ object Inet4 {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
/**
* Returns the [Inet4Address] representation of a [String] IP or host address.

View File

@ -24,7 +24,7 @@ object Inet6 {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
/**
* Returns the [Inet6Address] representation of a [String] IP or host address.

View File

@ -19,7 +19,7 @@ object Mac {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
enum class MacDelimiter(val delimiter: String) {
COLON(":"),

View File

@ -10,7 +10,7 @@ object NameSpace {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
object Route {
fun flush(nameSpace: String) {

View File

@ -9,7 +9,7 @@ object Route {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
fun flush() {
Executor.run("/sbin/ip", "route", "flush", "cache")

View File

@ -20,7 +20,7 @@ object Sntp {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
/**
* SNTP client for retrieving time.

View File

@ -37,7 +37,7 @@ object SocketUtils {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
private val EMPTY = Collections.enumeration(emptyList<Any>())

View File

@ -9,7 +9,7 @@ object VirtualEth {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
fun add(host: String, guest: String) {
if (Common.OS_LINUX) {

View File

@ -16,7 +16,7 @@ class Ping {
/**
* Gets the version number.
*/
const val version = "2.6"
const val version = "2.7"
}
private val count = 4