Skip to content

Commit

Permalink
Merge remote-tracking branch 'goog/main'
Browse files Browse the repository at this point in the history
Change-Id: Ica5052cd4b847fad499e33a4bd9f874cd0bc47b9
  • Loading branch information
shamalip committed May 10, 2023
2 parents ee454d3 + 4d48775 commit 7a2de83
Show file tree
Hide file tree
Showing 91 changed files with 644 additions and 425 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/Crane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Crane
path: Crane
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/JetLagged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: JetLagged
path: JetLagged
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/JetNews.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: JetNews
path: JetNews
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Jetcaster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Jetcaster
path: Jetcaster
9 changes: 5 additions & 4 deletions .github/workflows/Jetchat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Jetchat
path: Jetchat
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Jetsnack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Jetsnack
path: Jetsnack
2 changes: 1 addition & 1 deletion .github/workflows/Jetsurvey.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Jetsurvey
path: Jetsurvey
9 changes: 5 additions & 4 deletions .github/workflows/Owl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Owl
path: Owl
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Build all projects
run: ./scripts/gradlew_recursive.sh assembleDebug
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/Reply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
build:
uses: android/compose-samples/.github/workflows/build-sample.yml@main
uses: ./.github/workflows/build-sample.yml
with:
name: Reply
path: Reply
Expand All @@ -38,10 +38,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt
Expand All @@ -68,4 +69,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: test-reports-reply-${{ matrix.api-level }}
path: ${{ env.SAMPLE_PATH }}/app/build/reports
path: ${{ env.SAMPLE_PATH }}/app/build/reports
7 changes: 4 additions & 3 deletions .github/workflows/build-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Generate cache key
run: ./scripts/checksum.sh ${{ inputs.path }} checksum.txt
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: set up Java 11
uses: actions/setup-java@v2
- name: set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
distribution: 'zulu'
java-version: 17

- name: Apply spotless formatting
run: ./scripts/format.sh
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Check snapshot
working-directory: ${{ inputs.path }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- uses: actions/checkout@v3
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-version: 17
distribution: 'zulu'
cache: gradle

- name: Update dependencies
Expand Down
2 changes: 1 addition & 1 deletion Crane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ it is always scoped to the host Activity or Fragment. This means that calling `v
different factories in the same host Activity/Fragment don't have the desired effect; the _first_
factory will be always used.

This is the case of the [DetailsViewModel](detailsViewModel), which takes the name of
This is the case of the [DetailsViewModel](/app/src/main/java/androidx/compose/samples/crane/details/DetailsViewModel.kt), which takes the name of
a `City` as a parameter to load the required information for the screen. However, the above isn't a
problem in this sample, since `DetailsScreen` is always used in it's own newly launched Activity.

Expand Down
10 changes: 5 additions & 5 deletions Crane/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* limitations under the License.
*/

@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove when updating to Gradle 8.1 (https://github.com/gradle/gradle/issues/22797)
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
Expand All @@ -27,6 +26,7 @@ plugins {

android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "androidx.compose.samples.crane"

defaultConfig {
applicationId = "androidx.compose.samples.crane"
Expand Down Expand Up @@ -79,20 +79,20 @@ android {
compileOptions {
isCoreLibraryDesugaringEnabled = true

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildFeatures {
compose = true

buildConfig = true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}

packagingOptions {
packaging.resources {
// Multiple dependency bring these files in. Exclude them to enable
// our test APK to build (has no effect on our AARs)
excludes += "/META-INF/AL2.0"
Expand Down
11 changes: 11 additions & 0 deletions Crane/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@

# Repackage classes into the top-level.
-repackageclasses

# This is generated automatically by the Android Gradle plugin.
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
3 changes: 1 addition & 2 deletions Crane/app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
-->
<!-- Added as workaround for https://github.com/android/android-test/issues/1412 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="androidx.compose.samples.crane">
xmlns:tools="http://schemas.android.com/tools">

<application>

Expand Down
5 changes: 2 additions & 3 deletions Crane/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
~
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="androidx.compose.samples.crane">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />
<!--
Expand Down Expand Up @@ -59,4 +58,4 @@
android:exported="false" />
</application>

</manifest>
</manifest>
Loading

0 comments on commit 7a2de83

Please sign in to comment.