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

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

Closed
wants to merge 1 commit into from

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.
@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.

@@ -148,4 +148,15 @@ in
};
};

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";

@@ -12,12 +12,12 @@ let inherit (stdenv.lib) makeLibraryPath; in

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants