Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/check-public-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:

- name: Check Public API
run: |
./gradlew jbApiCheck \
./gradlew -p fork-project jbApiCheck \
--no-daemon --stacktrace
6 changes: 3 additions & 3 deletions .github/workflows/compose-publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Compose Publish Darwin + Native Linux
run: |
./gradlew publishComposeJb -Pcompose.platforms=macos,ios,tvos,watchos,linux,mingw \
./gradlew -p fork-project publishComposeJb -Pcompose.platforms=macos,ios,tvos,watchos,linux,mingw \
--no-daemon --stacktrace

compose-web-publish:
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Compose Publish Web
run: |
./gradlew publishComposeJb -Pcompose.platforms=web \
./gradlew -p fork-project publishComposeJb -Pcompose.platforms=web \
--no-daemon --stacktrace

compose-jvm-publish:
Expand All @@ -52,5 +52,5 @@ jobs:

- name: Compose Publish JVM
run: |
./gradlew publishComposeJb -Pcompose.platforms=jvm,android \
./gradlew -p fork-project publishComposeJb -Pcompose.platforms=jvm,android \
--no-daemon --stacktrace
16 changes: 8 additions & 8 deletions .github/workflows/compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Run Desktop Tests
run: |
./gradlew testDesktop \
./gradlew -p fork-project testDesktop \
--no-daemon --stacktrace

- name: Upload Screenshots
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Run iOS Tests
timeout-minutes: 15
run: |
./gradlew testIos \
./gradlew -p fork-project testIos \
--no-daemon --stacktrace

- name: Test Summary
Expand Down Expand Up @@ -214,14 +214,14 @@ jobs:
run: |
set -euo pipefail
TASKS=$(
./gradlew :mpp:testWeb${{ matrix.task }} -m --console=plain --no-configuration-cache \
./gradlew -p fork-project :mpp:testWeb${{ matrix.task }} -m --console=plain --no-configuration-cache \
--no-daemon -Pkotlin.compiler.execution.strategy=in-process \
| awk '/^:.*compileTestDevelopmentExecutable/ {print $1}' \
| tr '\n' ' '
)

if [ -n "$TASKS" ]; then
./gradlew $TASKS \
./gradlew -p fork-project $TASKS \
--no-daemon --stacktrace --no-parallel --no-configuration-cache \
-Dorg.gradle.jvmargs="-Xmx12g -XX:+UseParallelGC" \
-Porg.gradle.workers.max=1 -Pkotlin.compiler.execution.strategy=in-process
Expand Down Expand Up @@ -254,7 +254,7 @@ jobs:
MEM_SAMPLER_PID=$!
trap "kill ${MEM_SAMPLER_PID} || true" EXIT
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns && \
CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }} /usr/bin/time -v ./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }} /usr/bin/time -v ./gradlew -p fork-project :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
-Pjetbrains.androidx.web.tests.enableFirefox=false \
-Pjetbrains.androidx.web.tests.enableChrome=true

Expand Down Expand Up @@ -299,14 +299,14 @@ jobs:
run: |
set -euo pipefail
TASKS=$(
./gradlew :mpp:testWeb${{ matrix.task }} -m --console=plain --no-configuration-cache \
./gradlew -p fork-project :mpp:testWeb${{ matrix.task }} -m --console=plain --no-configuration-cache \
--no-daemon -Pkotlin.compiler.execution.strategy=in-process \
| awk '/^:.*compileTestDevelopmentExecutable/ {print $1}' \
| tr '\n' ' '
)

if [ -n "$TASKS" ]; then
./gradlew $TASKS \
./gradlew -p fork-project $TASKS \
--no-daemon --stacktrace --no-parallel --no-configuration-cache \
-Dorg.gradle.jvmargs="-Xmx12g -XX:+UseParallelGC" \
-Porg.gradle.workers.max=1 -Pkotlin.compiler.execution.strategy=in-process
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
done) &
MEM_SAMPLER_PID=$!
trap "kill ${MEM_SAMPLER_PID} || true" EXIT
./gradlew :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
./gradlew -p fork-project :mpp:testWeb${{ matrix.task }} ${{ env.GRADLE_WEB_TESTS_FLAGS }} \
-Pjetbrains.androidx.web.tests.enableFirefox=true \
-Pjetbrains.androidx.web.tests.enableChrome=false

Expand Down
2 changes: 2 additions & 0 deletions MULTIPLATFORM.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
2. Download Android SDK via [Android Studio](https://developer.android.com/studio/intro/update#sdk-manager) and specify it in `ANDROID_SDK_ROOT` environment variable.
4. Specify Gradle JVM to use JDK 17 in InteliJ IDEA Preferences (`Build, Execution, Deployment -> Build Tools -> Gradle`)

All `./gradlew` commands below assume the current working directory is `fork-project/`.

### Run tests

Run tests for Desktop:
Expand Down
24 changes: 24 additions & 0 deletions annotation/annotation-sampled/build-fork.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright 2019 The Android Open Source Project
*
* 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.
*/

plugins {
id("AndroidXPlugin")
id("kotlin")
}

dependencies {
}

51 changes: 51 additions & 0 deletions compose/animation/animation-core-lint/build-fork.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2021 The Android Open Source Project
*
* 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.
*/

/**
* This file was created using the `createProject` gradle task (./gradlew createProject)
*
* Please use the task when creating a new project, rather than copying an existing project and
* modifying its settings.
*/
import androidx.build.BundleInsideHelper
import androidx.build.SoftwareType

plugins {
id("AndroidXPlugin")
id("kotlin")
}

BundleInsideHelper.forInsideLintJar(project)

dependencies {
compileOnly libs.androidLintMinApi
compileOnly libs.kotlinStdlib
bundleInside(project(":compose:lint:common"))

testImplementation(project(":compose:lint:common-test"))
testImplementation libs.kotlinStdlib
testImplementation libs.androidLint
testImplementation libs.androidLintTests
testImplementation libs.junit
testImplementation libs.truth
}

androidx {
name = "Compose Animation Core Lint Checks"
type = SoftwareType.STANDALONE_PUBLISHED_LINT
inceptionYear = "2021"
description = "Compose Animation Core Lint Checks"
}
141 changes: 141 additions & 0 deletions compose/animation/animation-core/build-fork.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
* Copyright 2019 The Android Open Source Project
*
* 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.
*/

/**
* This file was created using the `createProject` gradle task (./gradlew createProject)
*
* Please use the task when creating a new project, rather than copying an existing project and
* modifying its settings.
*/


import androidx.build.SoftwareType
import androidx.build.PlatformIdentifier
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType

plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("JetBrainsAndroidXPlugin")
alias(libs.plugins.atomicFu)
}

androidXMultiplatform {
redirect("androidx.compose.animation") {
androidLibrary {
compileSdk = 35
namespace = "org.jetbrains.androidx.compose.animation.core"
}
}
desktop()
mac()
ios()
js()
wasmJs()

defaultPlatform(PlatformIdentifier.ANDROID)

sourceSets {
commonMain.dependencies {
implementation(project(":compose:runtime:runtime"))
implementation(project(":compose:ui:ui"))
implementation(project(":compose:ui:ui-unit"))
implementation(project(":compose:ui:ui-graphics"))
implementation(project(":compose:ui:ui-util"))
implementation("androidx.collection:collection:1.5.0")
api(libs.kotlinCoroutinesCore)
}

commonTest.dependencies {
implementation(kotlin("test"))
implementation(libs.kotlinCoroutinesTest)
implementation(project(":kruth:kruth"))
}

androidMain.dependencies {
api("androidx.annotation:annotation:1.8.1")
}

androidDeviceTest.dependencies {
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.testCore)
implementation(libs.junit)
implementation(libs.truth)
implementation(project(":compose:animation:animation"))
implementation(project(":compose:foundation:foundation"))
implementation("androidx.compose.ui:ui-test-junit4:1.2.1")
implementation(project(":compose:test-utils"))
implementation("androidx.compose.material3:material3:1.2.1")
implementation(libs.leakcanary)
implementation(libs.leakcanaryInstrumentation)
}

androidHostTest.dependencies {
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.truth)
implementation(libs.kotlinCoroutinesCore)
}

// TODO: Align naming: nonAndroidMain
jbMain {
dependsOn(commonMain)
}

jbTest {
dependsOn(commonTest)
}

desktopMain {
dependsOn(jbMain)
}

desktopTest {
dependsOn(jbTest)
}

nonJvmMain {
dependsOn(jbMain)
dependencies {
implementation(libs.atomicFu)
// To comply with Klib resolver until https://youtrack.jetbrains.com/issue/KT-61096 is fixed
implementation("org.jetbrains.compose.collection-internal:collection:1.10.0")
}
}

nonJvmTest {
dependsOn(jbTest)
}

nativeMain {
dependsOn(nonJvmMain)
}

nativeTest {
dependsOn(nonJvmTest)
}
}
}

androidx {
name = "Compose Animation Core"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2019"
description = "Animation engine and animation primitives that are the building blocks of the Compose animation library"
samples(project(":compose:animation:animation-core:animation-core-samples"))
}
56 changes: 56 additions & 0 deletions compose/animation/animation-core/samples/build-fork.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2019 The Android Open Source Project
*
* 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.
*/

/**
* This file was created using the `createProject` gradle task (./gradlew createProject)
*
* Please use the task when creating a new project, rather than copying an existing project and
* modifying its settings.
*/

import androidx.build.SoftwareType

plugins {
id("AndroidXPlugin")
id("com.android.library")
id("AndroidXComposePlugin")
id("org.jetbrains.kotlin.android")
}

dependencies {
compileOnly(project(":annotation:annotation-sampled"))
implementation(project(":compose:animation:animation"))
implementation(project(":compose:animation:animation-core"))
implementation(project(":compose:runtime:runtime"))
implementation(project(":compose:ui:ui"))
implementation("androidx.compose.ui:ui-unit:1.2.1")
implementation("androidx.compose.foundation:foundation:1.2.1")
implementation("androidx.compose.foundation:foundation-layout:1.2.1")
implementation("androidx.compose.material:material:1.2.1")
implementation("androidx.compose.material:material-icons-core:1.6.7")
}

androidx {
name = "Compose UI Animation Core Classes Samples"
type = SoftwareType.SAMPLES
inceptionYear = "2019"
description = "Contains the sample code for the Androidx Compose UI Animation Core Classes"
}

android {
compileSdk = 35
namespace = "androidx.compose.animation.core.samples"
}
Loading
Loading