Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Install Android SKD/NDK/JDK when installing Android Component #25

Open
Larusso opened this issue Sep 23, 2019 · 0 comments
Open

Install Android SKD/NDK/JDK when installing Android Component #25

Larusso opened this issue Sep 23, 2019 · 0 comments
Assignees
Labels

Comments

@Larusso
Copy link
Member

Larusso commented Sep 23, 2019

Description

Unity >2019 ships with bundled android sdk, android ndk and java jdk components. These components are still optional but to find the correct version for each unity version is hard.
As an example Unity 2019 needs android ndk r16b and Unity 2019.3 needs r19.
We should make sure to also install these components.

There is ongoing work in https://github.com/Larusso/unity-version-manager to support a better installation routine by providing a list of module ids. These ids are not listable at the moment so this is a blocker.

The unity modules.json marks these support modules with a parent and sync key. The value for parent android which is the module id for the android build support component. All other modules have a common sync key. It should be possible to fetch a list of all modules based on parent, sync keys.

excerpt modules.json

{
  "id": "android-sdk-ndk-tools",
  "name": "Android SDK & NDK Tools",
  "description": "Android SDK & NDK Tools 26.1.1",
  "downloadUrl": "https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip",
  "category": "Platforms",
  "installedSize": 174000000,
  "downloadSize": 148000000,
  "visible": true,
  "sync": "Android Build Support",
  "selected": true,
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK",
  "parent": "android",
  "eulaUrl1": "https://dl.google.com/dl/android/repository/repository2-1.xml",
  "eulaLabel1": "Android SDK and NDK License Terms from Google",
  "eulaMessage": "Please review and accept the license terms before downloading and installing Android's SDK and NDK."
}, {
  "id": "android-sdk-platform-tools",
  "name": "Android SDK Platform Tools",
  "description": "Android SDK Platform Tools 28.0.1",
  "downloadUrl": "https://dl.google.com/android/repository/platform-tools_r28.0.1-darwin.zip",
  "category": "Platforms",
  "installedSize": 15700000,
  "downloadSize": 4550000,
  "visible": false,
  "sync": "android-sdk-ndk-tools",
  "selected": true,
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK"
}, {
  "id": "android-sdk-build-tools",
  "name": "Android SDK Build Tools",
  "description": "Android SDK Build Tools 28.0.3",
  "downloadUrl": "https://dl.google.com/android/repository/build-tools_r28.0.3-macosx.zip",
  "category": "Platforms",
  "installedSize": 120000000,
  "downloadSize": 52600000,
  "visible": false,
  "sync": "android-sdk-ndk-tools",
  "selected": true,
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/build-tools",
  "renameTo": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/build-tools/28.0.3",
  "renameFrom": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/build-tools/android-9"
}, {
  "id": "android-sdk-platforms",
  "name": "Android SDK Platforms",
  "description": "Android SDK Platforms 28",
  "downloadUrl": "https://dl.google.com/android/repository/platform-28_r06.zip",
  "category": "Platforms",
  "installedSize": 121000000,
  "downloadSize": 60600000,
  "visible": false,
  "sync": "android-sdk-ndk-tools",
  "selected": true,
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/platforms",
  "renameTo": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/platforms/android-28",
  "renameFrom": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/SDK/platforms/android-9"
}, {
  "id": "android-ndk",
  "name": "Android NDK",
  "description": "Android NDK r19",
  "downloadUrl": "https://dl.google.com/android/repository/android-ndk-r19-darwin-x86_64.zip",
  "category": "Platforms",
  "installedSize": 2700000000,
  "downloadSize": 770000000,
  "visible": false,
  "sync": "android-sdk-ndk-tools",
  "selected": true,
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/NDK",
  "renameTo": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/NDK",
  "renameFrom": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r19"
}, {
  "id": "android-open-jdk",
  "name": "OpenJDK",
  "description": "Android Open JDK 8u172-b11",
  "downloadUrl": "http://download.unity3d.com/download_unity/open-jdk/open-jdk-mac-x64/jdk8u172-b11_4be8440cc514099cfe1b50cbc74128f6955cd90fd5afe15ea7be60f832de67b4.zip",
  "category": "Platforms",
  "installedSize": 72700000,
  "downloadSize": 165000000,
  "visible": true,
  "selected": true,
  "parent": "android",
  "sync": "Android Build Support",
  "destination": "{UNITY_PATH}/PlaybackEngines/AndroidPlayer/OpenJDK"
}

This should be generic for other platforms as well.

@Larusso Larusso pinned this issue Sep 23, 2019
@Larusso Larusso self-assigned this Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant