JDK 11 min requirements because of LTS.

This commit is contained in:
Erik C. Thauvin 2020-06-19 14:32:29 -07:00
parent dcd6996c39
commit c88be2b4e5
10 changed files with 22 additions and 40 deletions

View file

@ -34,15 +34,15 @@ jobs:
<<: *defaults <<: *defaults
docker: docker:
- image: cimg/openjdk:14.0 - image: cimg/openjdk:14.0.1
<<: *defaults_gradle <<: *defaults_gradle
build_gradle_jdk9: build_gradle_jdk11:
<<: *defaults <<: *defaults
docker: docker:
- image: circleci/openjdk:9 - image: circleci/openjdk:11.0.7
<<: *defaults_gradle <<: *defaults_gradle
@ -50,6 +50,6 @@ workflows:
version: 2 version: 2
gradle: gradle:
jobs: jobs:
- build_gradle_jdk9 - build_gradle_jdk11
- build_gradle_jdk14 - build_gradle_jdk14

2
.idea/compiler.xml generated
View file

@ -12,6 +12,6 @@
<module name="mobibot.main" /> <module name="mobibot.main" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel target="11" /> <bytecodeTargetLevel target="1.9" />
</component> </component>
</project> </project>

2
.idea/mobibot.iml generated
View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="mobibot" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.8.0-beta+034" type="JAVA_MODULE" version="4"> <module external.linked.project.id="mobibot" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.8.0-beta+043" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="mobibot:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.8.0-beta+034" type="JAVA_MODULE" version="4"> <module external.linked.project.id="mobibot:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.8.0-beta+043" type="JAVA_MODULE" version="4">
<component name="FacetManager"> <component name="FacetManager">
<facet type="kotlin-language" name="Kotlin"> <facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 11" allPlatforms="JVM [11]" useProjectSettings="false"> <configuration version="3" platform="JVM 9" allPlatforms="JVM [9]" useProjectSettings="false">
<compilerSettings> <compilerSettings>
<option name="additionalArguments" value="-Xallow-no-source-files" /> <option name="additionalArguments" value="-Xallow-no-source-files" />
</compilerSettings> </compilerSettings>
@ -12,7 +12,7 @@
<option name="noStdlib" value="true" /> <option name="noStdlib" value="true" />
<option name="noReflect" value="true" /> <option name="noReflect" value="true" />
<option name="moduleName" value="mobibot" /> <option name="moduleName" value="mobibot" />
<option name="jvmTarget" value="11" /> <option name="jvmTarget" value="9" />
<option name="languageVersion" value="1.3" /> <option name="languageVersion" value="1.3" />
<option name="apiVersion" value="1.3" /> <option name="apiVersion" value="1.3" />
<option name="pluginOptions"> <option name="pluginOptions">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="mobibot:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.8.0-beta+034" type="JAVA_MODULE" version="4"> <module external.linked.project.id="mobibot:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.8.0-beta+043" type="JAVA_MODULE" version="4">
<component name="FacetManager"> <component name="FacetManager">
<facet type="kotlin-language" name="Kotlin"> <facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" allPlatforms="JVM [1.6]" useProjectSettings="false"> <configuration version="3" platform="JVM 1.6" allPlatforms="JVM [1.6]" useProjectSettings="false">

View file

@ -13,7 +13,7 @@ addons:
organization: "ethauvin-github" organization: "ethauvin-github"
jdk: jdk:
- oraclejdk9 - openjdk11
- openjdk14 - openjdk14
before_install: before_install:
@ -21,6 +21,6 @@ before_install:
after_success: after_success:
- | - |
if [ "${TRAVIS_TEST_RESULT}" == 0 ] && [ "$TRAVIS_JDK_VERSION" == oraclejdk9 ]; then if [ "${TRAVIS_TEST_RESULT}" == 0 ] && [ "$TRAVIS_JDK_VERSION" == openjdk11 ]; then
./gradlew sonarqube ./gradlew sonarqube
fi fi

View file

@ -74,7 +74,6 @@ dependencies {
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs" compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs" testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
} }
test { test {

View file

@ -14,13 +14,13 @@ import java.time.*;
public final class ReleaseInfo { public final class ReleaseInfo {
public static final String PROJECT = "mobibot"; public static final String PROJECT = "mobibot";
public static final LocalDateTime BUILDDATE = public static final LocalDateTime BUILDDATE =
LocalDateTime.ofInstant(Instant.ofEpochMilli(1592043035449L), ZoneId.systemDefault()); LocalDateTime.ofInstant(Instant.ofEpochMilli(1592615322387L), ZoneId.systemDefault());
public static final int MAJOR = 0; public static final int MAJOR = 0;
public static final int MINOR = 8; public static final int MINOR = 8;
public static final int PATCH = 0; public static final int PATCH = 0;
public static final String PRERELEASE = "beta"; public static final String PRERELEASE = "beta";
public static final String BUILDMETA = "004"; public static final String BUILDMETA = "046";
public static final String VERSION = "0.8.0-beta+004"; public static final String VERSION = "0.8.0-beta+046";
/** /**
* Disables the default constructor. * Disables the default constructor.

View file

@ -36,18 +36,12 @@ import net.thauvin.erik.mobibot.entries.EntryLink
import net.thauvin.erik.pinboard.PinboardPoster import net.thauvin.erik.pinboard.PinboardPoster
import org.testng.Assert import org.testng.Assert
import org.testng.annotations.Test import org.testng.annotations.Test
import java.io.IOException import java.net.URL
import java.net.URI
import java.net.URISyntaxException
import java.net.URLEncoder import java.net.URLEncoder
import java.net.http.HttpClient
import java.net.http.HttpRequest
import java.net.http.HttpResponse
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
class PinboardUtilsTest : LocalProperties() { class PinboardUtilsTest : LocalProperties() {
@Test @Test
@Throws(InterruptedException::class, IOException::class, URISyntaxException::class)
fun pinboardTest() { fun pinboardTest() {
val apiToken = getProperty("pinboard-api-token") val apiToken = getProperty("pinboard-api-token")
val pinboard = PinboardPoster(apiToken) val pinboard = PinboardPoster(apiToken)
@ -66,21 +60,10 @@ class PinboardUtilsTest : LocalProperties() {
Assert.assertFalse(validatePin(apiToken, url = entry.link), "delete") Assert.assertFalse(validatePin(apiToken, url = entry.link), "delete")
} }
@Throws(IOException::class, URISyntaxException::class, InterruptedException::class)
private fun validatePin(apiToken: String, ircServer: String = "", url: String): Boolean { private fun validatePin(apiToken: String, ircServer: String = "", url: String): Boolean {
val request = HttpRequest.newBuilder().uri( val response = Utils.urlReader(URL("https://api.pinboard.in/v1/posts/get?auth_token=${apiToken}&tag=test&"
URI( + URLEncoder.encode(url, StandardCharsets.UTF_8)))
"https://api.pinboard.in/v1/posts/get?auth_token=${apiToken}&tag=test&"
+ URLEncoder.encode(url, StandardCharsets.UTF_8)
)
).GET().build()
val response = HttpClient.newBuilder() return response.contains(url) && response.contains(ircServer)
.build()
.send(request, HttpResponse.BodyHandlers.ofString())
return if (response.statusCode() == 200) {
response.body().contains(url) && response.body().contains(ircServer)
} else false
} }
} }

View file

@ -1,9 +1,9 @@
#Generated by the Semver Plugin for Gradle #Generated by the Semver Plugin for Gradle
#Sat Jun 13 03:10:34 PDT 2020 #Fri Jun 19 18:08:41 PDT 2020
version.buildmeta=004 version.buildmeta=046
version.major=0 version.major=0
version.minor=8 version.minor=8
version.patch=0 version.patch=0
version.prerelease=beta version.prerelease=beta
version.project=mobibot version.project=mobibot
version.semver=0.8.0-beta+004 version.semver=0.8.0-beta+046