-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(maven-container): automatically fetch Maven and OpenJDK
Along the way, improved the external tool helper to support libraries as well as executable binaries.
- Loading branch information
Showing
6 changed files
with
221 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2018 Garden Technologies, Inc. <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import { BinaryCmd, LibraryPlatformSpec } from "../../util/ext-tools" | ||
|
||
const spec: LibraryPlatformSpec = { | ||
url: "http://mirror.23media.de/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz", | ||
sha256: "6a1b346af36a1f1a491c1c1a141667c5de69b42e6611d3687df26868bc0f4637", | ||
extract: { | ||
format: "tar", | ||
targetPath: ["apache-maven-3.6.0", "bin", "mvn"], | ||
}, | ||
} | ||
|
||
export const maven = new BinaryCmd({ | ||
name: "maven", | ||
specs: { | ||
darwin: spec, | ||
linux: spec, | ||
win32: spec, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright (C) 2018 Garden Technologies, Inc. <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
import { Library, LibraryPlatformSpec } from "../../util/ext-tools" | ||
|
||
const jdk8Version = "jdk8u202-b08" | ||
|
||
function jdk8Spec(filename: string, sha256: string): LibraryPlatformSpec { | ||
return { | ||
url: `https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/${jdk8Version}/${filename}`, | ||
sha256, | ||
extract: { | ||
format: "tar", | ||
targetPath: [jdk8Version, "Contents", "Home"], | ||
}, | ||
} | ||
} | ||
|
||
function jdk11Spec(filename: string, sha256: string): LibraryPlatformSpec { | ||
return { | ||
url: `https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.2%2B9/${filename}`, | ||
sha256, | ||
extract: { | ||
format: "tar", | ||
targetPath: ["jdk-11.0.2+9", "Contents", "Home"], | ||
}, | ||
} | ||
} | ||
|
||
export const openJdks: { [version: number]: Library } = { | ||
8: new Library({ | ||
name: "openjdk-8", | ||
specs: { | ||
darwin: jdk8Spec( | ||
"OpenJDK8U-jdk_x64_mac_hotspot_8u202b08.tar.gz", | ||
"059f7c18faa6722aa636bbd79bcdff3aee6a6da5b34940b072ea6e3af85bbe1d", | ||
), | ||
linux: jdk8Spec( | ||
"OpenJDK8U-jdk_x64_linux_hotspot_8u202b08.tar.gz", | ||
"f5a1c9836beb3ca933ec3b1d39568ecbb68bd7e7ca6a9989a21ff16a74d910ab", | ||
), | ||
win32: jdk8Spec( | ||
"OpenJDK8U-jdk_x64_windows_hotspot_8u202b08.zip", | ||
"2637dab3bc81274e19991eebc27684276b482dd71d0f84fedf703d4fba3576e5", | ||
), | ||
}, | ||
}), | ||
11: new Library({ | ||
name: "openjdk-11", | ||
specs: { | ||
darwin: jdk11Spec( | ||
"OpenJDK11U-jdk_x64_mac_hotspot_11.0.2_9.tar.gz", | ||
"fffd4ed283e5cd443760a8ec8af215c8ca4d33ec5050c24c1277ba64b5b5e81a", | ||
), | ||
linux: jdk11Spec( | ||
"OpenJDK11U-jdk_x64_linux_hotspot_11.0.2_9.tar.gz", | ||
"d02089d834f7702ac1a9776d8d0d13ee174d0656cf036c6b68b9ffb71a6f610e", | ||
), | ||
win32: jdk11Spec( | ||
"OpenJDK11U-jdk_x64_windows_hotspot_11.0.2_9.zip", | ||
"bde1648333abaf49c7175c9ee8ba9115a55fc160838ff5091f07d10c4bb50b3a", | ||
), | ||
}, | ||
}), | ||
} |
Oops, something went wrong.