Skip to content

WIP: Updating android sdk and related tools to version 26.#36112

Closed
eskimor wants to merge 1 commit intoNixOS:masterfrom
eskimor:update-androidsdk-unstable
Closed

WIP: Updating android sdk and related tools to version 26.#36112
eskimor wants to merge 1 commit intoNixOS:masterfrom
eskimor:update-androidsdk-unstable

Conversation

@eskimor
Copy link
Contributor

@eskimor eskimor commented Feb 28, 2018

My Android application based on the reflex-platform does not yet build with this
changes. So please don't merge. I am just putting it here, because I won't get
to finishing this for at least a few weeks, so others needing this, can more
easily pick up the work, if needed.

Also full disclaimer: I am an absolute noob when it comes to Android
development, so if someone more involved can have a look at my changes - that
would be great.

Motivation for this change

If you build an Android application requiring APIs like Foreground service, you need at least version 26 of the androidsdk to have it compile.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

My Android application based on the reflex-platform does not yet build with this
changes. So please don't merge. I am just putting it here, because I won't get
to finishing this for at least a few weeks, so others needing this, can more
easily pick up the work, if needed.

Also full disclaimer: I am an absolute noob when it comes to Android
development, so if someone more involved can have a look at my changes - that
would be great.
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Feb 28, 2018
@svanderburg
Copy link
Member

Hmm great initiative. I'm however have also started some attempts to package this new SDK concurrently, but I haven't published anything about it yet.

Furthermore, there is something else you need to take into account -- the newer Android SDK's license has changed and mandates people to accept an EULA. This means that in Nixpkgs, we must prevent the SDK from being downloaded automatically because this violates the terms and conditions.

@eskimor
Copy link
Contributor Author

eskimor commented Feb 28, 2018

Hmm great initiative. I'm however have also started some attempts to package this new SDK concurrently, but I haven't published anything about it yet.

Awesome! I am happy to assist!

Furthermore, there is something else you need to take into account -- the newer Android SDK's license has changed and mandates people to accept an EULA. This means that in Nixpkgs, we must prevent the SDK from being downloaded automatically because this violates the terms and conditions.

That's kind of a bummer. How do we handle something like this in nix? We can't really package it then - right?

@eskimor
Copy link
Contributor Author

eskimor commented Apr 7, 2018

@svanderburg do you have a solution for the EULA problem? Are there any other blockers?

@nicknovitski
Copy link
Contributor

Other packages with license agreements work by requiring the user to specify some argument or config option. See sc2-headless, or maybe even androidenv.buildgradleapp.

@eskimor
Copy link
Contributor Author

eskimor commented Oct 23, 2018

uh nice, thank you!

@mmahut
Copy link
Member

mmahut commented Aug 9, 2019

Any updates on this pull request, please?

Copy link
Contributor

@lucafavatella lucafavatella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eskimor Could you please consider closing this PR? Please find analysis below.


Based on PR title and quick review of PR content, I understand intention of this PR is to update Android-related dev tools to version 26. Based on current master branch, the changes of this PR are superseded.

In the comments of this PR in Oct 2018 there were concerns re license - e.g.:

Furthermore, there is something else you need to take into account -- the newer Android SDK's license has changed and mandates people to accept an EULA. This means that in Nixpkgs, we must prevent the SDK from being downloaded automatically because this violates the terms and conditions.

EULA-related changes were introduced in 2019 e.g. #54915 so the comments in this PR are superseded.

};
};

source_26 = buildSource {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems superseded in current master branch:

"sources"."26" = {
name = "sources";
path = "sources/android-26";
revision = "26";
displayName = "Sources for Android 26";
archives = {
all = fetchurl {
url = https://dl.google.com/android/repository/sources-26_r01.zip;
sha1 = "2af701ee3223d580409288540b1d06932fd8f9b9";

stdenv.mkDerivation rec {
name = "android-sdk-${version}";
version = "25.2.5";
version = "26.0.1";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems superseded in current master branch:

"tools"."26.1.1" = {
name = "tools";
path = "tools";
revision = "26.1.1";
displayName = "Android SDK Tools";
archives = {
macosx = fetchurl {
url = https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip;
sha1 = "ed85ea7b59bc3483ce0af4c198523ba044e083ad";
};
linux = fetchurl {
url = https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip;
sha1 = "8c7c28554a32318461802c1291d76fccfafde054";

@eskimor
Copy link
Contributor Author

eskimor commented Mar 9, 2020

Indeed, this is obsolete.

@eskimor eskimor closed this Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants