File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11plugins {
2+ id " xyz.wagyourtail.jvmdowngrader" version " 1.3.6"
23 id " maven-publish"
34 id " java-library"
45 id " java"
56}
67
78base. archivesName = " PlatformTools"
8- version = " 3.1.2 "
9+ version = " 3.1.3 "
910group = " org.redlance"
1011
1112repositories {
@@ -23,9 +24,33 @@ dependencies {
2324 implementation api(" ca.weblite:java-objc-bridge:1.1" )
2425}
2526
27+ def javaTarget = 17
28+
2629tasks. withType(JavaCompile ). configureEach {
2730 options. encoding = " UTF-8"
28- options. release. set 17
31+ options. release. set(javaTarget)
32+ }
33+
34+ jar {
35+ manifest. attributes(" Multi-Release" : true )
36+ }
37+
38+ downgradeJar {
39+ dependsOn jar
40+
41+ def versions = []
42+ for (int i = javaTarget; i >= 8 ; i-- ) {
43+ versions. add(JavaVersion . toVersion(i))
44+ }
45+
46+ multiReleaseOriginal = true
47+ multiReleaseVersions = versions
48+
49+ downgradeTo = JavaVersion . VERSION_1_8
50+ classpath = configurations. compileClasspath
51+
52+ inputFile = tasks. jar. archiveFile
53+ archiveClassifier. set(" java8" )
2954}
3055
3156java {
@@ -35,6 +60,11 @@ java {
3560publishing {
3661 publications {
3762 mavenJava(MavenPublication ) {
63+ artifact(tasks. downgradeJar) {
64+ classifier = " java8"
65+ extension = " jar"
66+ }
67+
3868 artifactId = " platformtools"
3969
4070 pom {
Original file line number Diff line number Diff line change 1+ pluginManagement {
2+ repositories {
3+ mavenLocal()
4+ maven {
5+ url = " https://maven.wagyourtail.xyz/releases"
6+ }
7+ maven {
8+ url = " https://maven.wagyourtail.xyz/snapshots"
9+ }
10+ mavenCentral()
11+ gradlePluginPortal()
12+ }
13+ }
14+
115rootProject. name = " platformtools"
You can’t perform that action at this time.
0 commit comments