Skip to content

Android O Preview support #514

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

Merged
merged 2 commits into from
Apr 25, 2017
Merged

Android O Preview support #514

merged 2 commits into from
Apr 25, 2017

Conversation

atsushieno
Copy link
Contributor

No description provided.

@atsushieno atsushieno added the do-not-merge PR should not be merged. label Mar 22, 2017
@atsushieno
Copy link
Contributor Author

It also depends on dotnet/java-interop#134 (Java.Interop is not bumped yet)

@atsushieno
Copy link
Contributor Author

atsushieno commented Mar 22, 2017

How to try to build O preview:
$ AndroidApiLevel=26 AndroidPlatformId=O AndroidFrameworkVersion=7.99.0 make

<HostOS>Darwin</HostOS>
<DestDir>platform-tools</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="tools_r24.4.1-macosx.zip">
<AndroidSdkItem Include="tools_r25.3.1-macosx.zip">
Copy link
Contributor

Choose a reason for hiding this comment

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

Alas, a tools bump likely means we'll need to deal with the android deprecation, since src/sqlite-xamarin/sqlite-xamarin.targets uses android create project, which no longer exists.

Ouch. :-(

Copy link
Contributor

@jonpryor jonpryor Mar 22, 2017

Choose a reason for hiding this comment

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

This is failing:

Unable to download URL `https://dl-ssl.google.com/android/repository/tools_r25.3.1-macosx.zip` to `/Users/builder/android-archives/tools_r25.3.1-macosx.zip`: 404 (Not Found)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am aware of all those download failures. I have no idea what the correct URLs are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's also "where should those unstable API stuff go?" problem...

Copy link
Contributor

Choose a reason for hiding this comment

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

There's also "where should those unstable API stuff go?" problem...

I don't understand the question.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My natural assumption on the Android SDK Tooling is that SDK Tools r25.3.1 and perhaps newer build-tools are required to support Android O API. At least we have to install "platform-O" things. But they are not available via the old Android SDK Manager (in the old SDK Tools). And that new SDK Tools version is only available as Beta version (Beta, Alpha or Canary). That means, to include Android O API support we will have to switch to Beta SDK Tools, even though our stable API is still 24 or 25.

@@ -30,11 +30,11 @@
<HostOS>Darwin</HostOS>
<DestDir>build-tools\$(XABuildToolsVersion)</DestDir>
</AndroidSdkItem>
<AndroidSdkItem Include="platform-tools_r23-macosx.zip">
<AndroidSdkItem Include="platform-tools_r26.0.0-rc1-macosx.zip">
Copy link
Contributor

@jonpryor jonpryor Mar 22, 2017

Choose a reason for hiding this comment

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

This is failing:

Unable to download URL `https://dl-ssl.google.com/android/repository/platform-tools_r26.0.0-rc1-macosx.zip` to `/Users/builder/android-archives/platform-tools_r26.0.0-rc1-macosx.zip`: 404 (Not Found)

@@ -56,7 +56,7 @@
<AllSupported32BitTargetAndroidAbis>armeabi;armeabi-v7a;x86</AllSupported32BitTargetAndroidAbis>
<AllSupported64BitTargetAndroidAbis>arm64-v8a;x86_64</AllSupported64BitTargetAndroidAbis>
<AllSupportedTargetAndroidAbis>$(AllSupported32BitTargetAndroidAbis);$(AllSupported64BitTargetAndroidAbis)</AllSupportedTargetAndroidAbis>
<XABuildToolsVersion>25.0.1</XABuildToolsVersion>
<XABuildToolsVersion>26.0.0-rc1</XABuildToolsVersion>
Copy link
Contributor

Choose a reason for hiding this comment

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

build-tools_r26.0.0-rc1-macosx.zip doesn't exist causing a failure:

Unable to download URL `https://dl-ssl.google.com/android/repository/build-tools_r26.0.0-rc1-macosx.zip` to `/Users/builder/android-archives/build-tools_r26.0.0-rc1-macosx.zip`: 404 (Not Found)

@atsushieno atsushieno force-pushed the o-preview branch 2 times, most recently from 4746506 to 9e4f1fb Compare March 23, 2017 13:30
@atsushieno
Copy link
Contributor Author

For future reference, the updated catalog was found at https://dl-ssl.google.com/android/repository/repository2-1.xml . Hopefully it builds now (it did locally).

@atsushieno atsushieno force-pushed the o-preview branch 2 times, most recently from 0e695a0 to a9cb319 Compare March 23, 2017 17:43
@jonpryor
Copy link
Contributor

@atsushieno: The builds are breaking because make doesn't like us:

build-tools/scripts/BuildEverything.mk:80: *** multiple target patterns.  Stop.

Please rebase on fc22191 or later, which simplifies BuildEverything.mk (adding .PHONY targets, etc.). That might resolve the "multiple t target patterns" error.

@atsushieno atsushieno changed the title [WIP][DO-NOT-MERGE] Android O Preview support Android O Preview support Mar 25, 2017
@atsushieno
Copy link
Contributor Author

It is not WIP anymore, but I have no idea why Jenkins does not trigger actual builds.

@jonpryor
Copy link
Contributor

build

@jonpryor
Copy link
Contributor

@atsushieno: It is triggering actual builds, the builds just fail instantly:

build-tools/scripts/BuildEverything.mk:80: *** multiple target patterns.  Stop.

Given that BuildEverything.mk:80 is this

jenkins: prepare leeroy $(ZIP_OUTPUT)

I have to believe that $(ZIP_OUTPUT) contains a :, probably because $(PRODUCT_VERSION) is generating an error:

PRODUCT_VERSION   = $(shell $(MSBUILD) $(MSBUILD_FLAGS) /p:DoNotLoadOSProperties=True /nologo /v:minimal /t:GetProductVersion build-tools/scripts/Info.targets | tr -d '[[:space:]]')

I'm not sure why this would be generating an error; we'll need to try this on the target machine.

@atsushieno atsushieno force-pushed the o-preview branch 2 times, most recently from 0e42c59 to f72971a Compare March 27, 2017 07:48
@atsushieno
Copy link
Contributor Author

After merging master I could reproduce this, and made some fixes in Configuration.props (there was tag mismatch that I didn't notice when I was building it with overrides for O) and BuildEverything.mk. Let's see if it builds

@@ -31,6 +31,7 @@
<MonoSgenBridgeVersion Condition=" '$(MonoSgenBridgeVersion)' == '' ">5</MonoSgenBridgeVersion>
<HOME Condition=" '$(HOME)' == '' ">$(HOMEDRIVE)$(HOMEPATH)</HOME>
<AndroidApiLevel Condition=" '$(AndroidApiLevel)' == '' ">25</AndroidApiLevel>
<AndroidPlatformId Condition=" '$(AndroidPlatformId)' == '' ">25</AndroidPlatformId>
Copy link
Contributor

Choose a reason for hiding this comment

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

What about making this $(AndroidApiLevel) instead so that the existing build documentation (i.e. only having to specify AndroidApiLevel and AndroidFrameworkVersion to build/override in Configuration.Overrides.props) stays valid?

Copy link
Contributor Author

@atsushieno atsushieno Mar 27, 2017

Choose a reason for hiding this comment

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

Do you mean, the default value i.e. <AndroidPlatformId Condition=" '$(AndroidPlatformId)' == '' ">$(AndroidApiLevel)</AndroidPlatformId> ? Yeah that'd be better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Exactly

@atsushieno atsushieno force-pushed the o-preview branch 8 times, most recently from e151f86 to ef06634 Compare March 31, 2017 02:35
public override bool Execute ()
{
var licdir = Path.Combine (Path.Combine (AndroidSdkDirectory, "licenses"));
if (!Directory.Exists (licdir))
Copy link
Contributor

Choose a reason for hiding this comment

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

This if isn't necessary; Directory.CreateDirectory() doesn't throw if the directory already exists.

@atsushieno atsushieno force-pushed the o-preview branch 2 times, most recently from ca78e09 to e48f8ed Compare April 4, 2017 12:18
@atsushieno
Copy link
Contributor Author

Updated the commit message to explain what has caused the big changes.

@atsushieno
Copy link
Contributor Author

build

@atsushieno atsushieno force-pushed the o-preview branch 5 times, most recently from 6c2e85b to 9cfb7ba Compare April 18, 2017 19:59
</AndroidSdkItem>
<AndroidSdkItem Include="docs-24_r01.zip">
Copy link
Contributor

Choose a reason for hiding this comment

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

We should continue installing docs.zip.

The changes are big due to the structural changes in Android SDK, particularly
that "android" command line tool is gone and they had to be rewritten.
Samples that depended on "create" or "update" command had to be checked in
as already-created state so that they don't have to bring further dependencies.

Changes in the library (Mono.Android) itself is not very big at all.
@jonpryor jonpryor merged commit 571546a into dotnet:master Apr 25, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants