This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New samples, improve docs, update versions
Introduce new samples: * config-splits * cookie-api Improve documentation * Improve README files throughout. * More consistent README files throughout. * Unify launch instructions within the top level REAMDE.md. * Move `hello` sample to `hello-java` to be consistent with `hello-kotlin`. * Remove resources only relevant to serving in publication case. Update versions * gradle and plugin to beta6 requirements * support lib to 26.0.1
- Loading branch information
1 parent
39b5137
commit 95085c3
Showing
182 changed files
with
2,788 additions
and
547 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,39 @@ | ||
# Android Instant Apps - Config Splits Sample | ||
|
||
This sample displays the usage of | ||
[Configuration APKs](https://developer.android.com/topic/instant-apps/guides/config-splits.html) | ||
via configuration splits within gradle. | ||
|
||
The setup of Configuration APKs can be seen within the `features/build.gradle` file. | ||
|
||
After a build, the resulting zip file (`instant/build/output/apk/debug/instant-debug.zip`) | ||
holds several APKs, each with a specific configuration. | ||
|
||
In a production environment, APKs that are relevant to users' display density and locale are | ||
served to the users. This reduces the file size over the wire and on device. | ||
|
||
## Launch URL | ||
|
||
`https://configsplits.instantappsample.com` | ||
|
||
## License | ||
|
||
``` | ||
Copyright 2017 Google Inc. | ||
Licensed to the Apache Software Foundation (ASF) under one or more contributor | ||
license agreements. See the NOTICE file distributed with this work for | ||
additional information regarding copyright ownership. The ASF licenses this | ||
file to you under the Apache License, Version 2.0 (the "License"); you may not | ||
use this file except in compliance with the License. You may obtain a copy of | ||
the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations under | ||
the License. | ||
``` | ||
|
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,53 @@ | ||
/* | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
buildscript { | ||
ext.kotlin_version = '1.1.4-3' | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.0.0-beta6' | ||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} | ||
|
||
ext { | ||
buildTools = '26.0.1' | ||
compileSdk = 26 | ||
minSdkInstant = 23 | ||
minSdk = 21 | ||
versionCode = 1 | ||
versionName = '1.0' | ||
supportLib = '26.1.0' | ||
} |
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,54 @@ | ||
/* | ||
* Copyright 2017 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
apply plugin: 'com.android.feature' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdkVersion rootProject.compileSdk | ||
buildToolsVersion rootProject.buildTools | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.minSdk | ||
targetSdkVersion rootProject.compileSdk | ||
versionCode rootProject.versionCode | ||
versionName rootProject.versionName | ||
} | ||
|
||
buildTypes { | ||
debug {} | ||
} | ||
|
||
baseFeature true | ||
|
||
splits { | ||
generatePureSplits true | ||
|
||
language { | ||
enable true | ||
include "de", "de-rAT", "de-rCH", "en", "en-rAU", "es", "pl" | ||
} | ||
density { | ||
enable true | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
api "com.android.support:appcompat-v7:${rootProject.supportLib}" | ||
application project(':installed') | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" | ||
} |
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,53 @@ | ||
<!-- | ||
~ Copyright 2017 Google Inc. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.google.android.instantapps.samples.configsplits.feature"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" | ||
android:supportsRtl="true"> | ||
|
||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name"> | ||
|
||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
<intent-filter | ||
android:autoVerify="true" | ||
android:order="1"> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<category android:name="android.intent.category.BROWSABLE" /> | ||
<category android:name="android.intent.category.DEFAULT" /> | ||
|
||
<data android:scheme="https" /> | ||
<data android:scheme="http" /> | ||
<data android:host="configsplits.instantappsample.com" /> | ||
</intent-filter> | ||
<meta-data | ||
android:name="default-url" | ||
android:value="https://configsplits.instantappsample.com" /> | ||
</activity> | ||
|
||
</application> | ||
</manifest> |
Oops, something went wrong.