Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Java versions #158

Closed
TWiStErRob opened this issue Nov 1, 2021 · 2 comments
Closed

Review Java versions #158

TWiStErRob opened this issue Nov 1, 2021 · 2 comments
Milestone

Comments

@TWiStErRob
Copy link
Owner

4.2.2 is on 11, 7.0 is on 11, yet BaseJavaPlugin configures 7

@TWiStErRob TWiStErRob added this to the v0.13 milestone Nov 1, 2021
@TWiStErRob
Copy link
Owner Author

TWiStErRob commented Nov 1, 2021

Index: plugin/src/main/kotlin/net/twisterrob/gradle/java/BaseJavaPlugin.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/plugin/src/main/kotlin/net/twisterrob/gradle/java/BaseJavaPlugin.kt b/plugin/src/main/kotlin/net/twisterrob/gradle/java/BaseJavaPlugin.kt
--- a/plugin/src/main/kotlin/net/twisterrob/gradle/java/BaseJavaPlugin.kt	(revision 6228f83a440f2a3ee645e8a5291526249baf5507)
+++ b/plugin/src/main/kotlin/net/twisterrob/gradle/java/BaseJavaPlugin.kt	(date 1635792670324)
@@ -91,13 +91,14 @@
 	}
 	if (!rt.exists()) {
 		logger.warn(
-			"Java Compatibility: javac needs a bootclasspath, "
+			"Java Compatibility of $this: javac needs a bootclasspath, "
 					+ "but no jre/lib/rt.jar or lib/rt.jar found in $envVar (=$root).\n"
-					+ "Make sure $envVar is set to a distribution of JDK ${compileVersion.majorVersion}."
+					+ "Make sure $envVar is set to a distribution of JDK ${compileVersion.majorVersion}. "
+					+ "Gradle build is running on Java ${JavaVersion.current()} (${System.getProperty("java.version")}) from ${System.getProperty("java.home")}."
 		)
 		return
 	}
-	logger.info("Java Compatibility: using rt.jar from $rt")
+	logger.info("Java Compatibility of $this: using rt.jar from $rt")
 	options.bootstrapClasspath = project.files(rt.absolutePath)
 }
 
@@ -106,7 +107,7 @@
 	val origT = targetCompatibility
 	sourceCompatibility = ver.toString()
 	targetCompatibility = ver.toString()
-	logger.info("Changed compatibility ${origS}/${origT} to ${ver}/${ver}")
+	logger.info("Changed compatibility of $this: ${origS}/${origT} to ${ver}/${ver}")
 }
 
 /**
Index: plugin/src/test/kotlin/net/twisterrob/gradle/java/JavaPluginIntgTest.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/plugin/src/test/kotlin/net/twisterrob/gradle/java/JavaPluginIntgTest.kt b/plugin/src/test/kotlin/net/twisterrob/gradle/java/JavaPluginIntgTest.kt
--- a/plugin/src/test/kotlin/net/twisterrob/gradle/java/JavaPluginIntgTest.kt	(revision 6228f83a440f2a3ee645e8a5291526249baf5507)
+++ b/plugin/src/test/kotlin/net/twisterrob/gradle/java/JavaPluginIntgTest.kt	(date 1635793265757)
@@ -245,6 +245,6 @@
 		result.assertSuccess(":compileDebugUnitTestJavaWithJavac")
 		result.assertSuccess(":compileDebugAndroidTestJavaWithJavac")
 		result.assertNoOutputLine(""".*bootstrap class path not set in conjunction with.*""".toRegex())
-		result.assertNoOutputLine(""".*Java Compatibility: javac needs a bootclasspath.*""".toRegex())
+		result.assertNoOutputLine(""".*Java Compatibility.*: javac needs a bootclasspath.*""".toRegex())
 	}
 }

@TWiStErRob TWiStErRob modified the milestones: v0.13, v0.14 Dec 17, 2021
@TWiStErRob TWiStErRob modified the milestones: v0.15, v0.16 Jan 21, 2023
@TWiStErRob
Copy link
Owner Author

This code was removed in #370

@TWiStErRob TWiStErRob closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2023
@TWiStErRob TWiStErRob modified the milestones: v0.16, v0.15 Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant