-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added NavigationRailView
- Loading branch information
Showing
39 changed files
with
1,415 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: publish-navigationrail-ado | ||
# This workflow builds and publishes in ADO the NavigationRail artifact. | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'navigationrail*' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: 'Triggers publication to ADO - NavigationRail' | ||
home: | ||
description: 'location' | ||
required: false | ||
|
||
jobs: | ||
publish-NavigationRail-ADO: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
# Base64 decodes and pipes the GPG key content into the secret file | ||
- name: Prepare environment | ||
env: | ||
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }} | ||
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }} | ||
run: | | ||
git fetch --unshallow | ||
sudo bash -c "echo '$SIGNING_SECRET_KEY' | base64 -d > '$SIGNING_SECRET_FILE'" | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: clean | ||
run: ./gradlew :navigationrail:navigationrail:clean | ||
|
||
# Builds the release artifacts of the library | ||
- name: Release build | ||
run: ./gradlew :navigationrail:navigationrail:assembleRelease | ||
|
||
# Generates other artifacts | ||
- name: Source jar | ||
run: ./gradlew :navigationrail:navigationrail:androidSourcesJar | ||
|
||
# Generates docs artifact | ||
- name: Docs jar | ||
run: ./gradlew :navigationrail:navigationrail:dokkaHtmlJar | ||
|
||
# Runs upload to ADO | ||
- name: Publish to ADO | ||
run: ./gradlew :navigationrail:navigationrail:publishSurfaceDuoSDKPublicationToADORepository --max-workers 1 | ||
env: | ||
ADO_URL: ${{ secrets.ADO_URL }} | ||
ADO_USER: ${{ secrets.ADO_USER }} | ||
ADO_PASSWD: ${{ secrets.ADO_PASSWD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }} |
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,74 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: publish-navigationrail-mavencentral | ||
# This workflow builds and publishes in Maven Central the NavigationRail artifact. | ||
# Although the final publishing step has to be done manually in Sonatype site. | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'navigationrail*' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: 'Triggers publication to MavenCentral - NavigationRail' | ||
home: | ||
description: 'location' | ||
required: false | ||
|
||
jobs: | ||
publish-NavigationRail-MavenCentral: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
|
||
# Base64 decodes and pipes the GPG key content into the secret file | ||
- name: Prepare environment | ||
env: | ||
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }} | ||
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }} | ||
run: | | ||
git fetch --unshallow | ||
sudo bash -c "echo '$SIGNING_SECRET_KEY' | base64 -d > '$SIGNING_SECRET_FILE'" | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: clean | ||
run: ./gradlew :navigationrail:navigationrail:clean | ||
|
||
# Builds the release artifacts of the library | ||
- name: Release build | ||
run: ./gradlew :navigationrail:navigationrail:assembleRelease | ||
|
||
# Generates other artifacts | ||
- name: Source jar | ||
run: ./gradlew :navigationrail:navigationrail:androidSourcesJar | ||
|
||
# Generates docs artifact | ||
- name: Docs jar | ||
run: ./gradlew :navigationrail:navigationrail:dokkaHtmlJar | ||
|
||
# Runs upload to MavenCentral (final release step will be manually done in Sonatype site) | ||
- name: Publish to MavenCentral | ||
run: ./gradlew :navigationrail:navigationrail:publishSurfaceDuoSDKPublicationToMavencentralRepository --max-workers 1 | ||
env: | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_SECRET_FILE: ${{ secrets.SIGNING_SECRET_FILE }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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,64 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
plugins { | ||
id 'com.android.library' | ||
id 'kotlin-android' | ||
} | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'com.microsoft.device.dualscreen' | ||
PUBLISH_ARTIFACT_ID = 'navigationrail' | ||
LIBRARY_DESCRIPTION = 'Library that implements the NavigationRail specifications and adapts automatically to the different foldable configurations' | ||
LIBRARY_VERSION = rootProject.ext.navigationRailVersionName | ||
} | ||
apply from: "${rootProject.projectDir}/publishing.gradle" | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
|
||
versionCode rootProject.ext.navigationRailVersionCode | ||
versionName rootProject.ext.navigationRailVersionName | ||
|
||
testInstrumentationRunner rootProject.ext.config.testInstrumentationRunner | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
api project(':utils:wm-utils') | ||
|
||
implementation kotlinDependencies.kotlinStdlib | ||
implementation androidxDependencies.lifecycleRuntimeKtx | ||
api materialDependencies.material | ||
api androidxDependencies.windowManager | ||
|
||
api materialDependencies.material160 | ||
|
||
testImplementation testDependencies.junit | ||
|
||
androidTestImplementation project(':utils:test-utils') | ||
androidTestImplementation commonDependencies.mockitoDexMaker | ||
androidTestImplementation commonDependencies.mockitoCore | ||
androidTestImplementation instrumentationTestDependencies.junit | ||
androidTestImplementation instrumentationTestDependencies.testRules | ||
androidTestImplementation instrumentationTestDependencies.espressoCore | ||
androidTestImplementation instrumentationTestDependencies.uiAutomator | ||
} |
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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright (c) Microsoft Corporation. All rights reserved. | ||
~ Licensed under the MIT License. | ||
~ | ||
--> | ||
<manifest package="com.microsoft.device.dualscreen.navigationrail"> | ||
</manifest> |
Oops, something went wrong.