Skip to content

Commit

Permalink
Merge pull request #21 from eyedol/e/addIosTargetSupport
Browse files Browse the repository at this point in the history
Add iOS target support
  • Loading branch information
sproctor authored Dec 21, 2024
2 parents 3d8e185 + 9af5b5d commit 14fc869
Show file tree
Hide file tree
Showing 21 changed files with 660 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build

on:
# Only run on push to main branch
push:
branches:
- main
# Always run on PRs
pull_request:

jobs:
build:
name: Build and Test
runs-on: 'macos-latest'
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4

- name: Install JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Build with Gradle
run: ./gradlew build

publish:
if: github.repository == 'sproctor/compose-data-table' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: [build]
runs-on: macos-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4

- name: Install JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Publish release
run: ./gradlew publish --no-configuration-cache
if: success()
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ app/release/*
**/bin/
**/moko-resources-generated.js
**/.kotlin/*

.fleet

# General
.DS_Store
.externalNativeBuild
5 changes: 5 additions & 0 deletions data-table-material3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ group = "com.seanproctor"
version = extra["datatable.version"] as String

kotlin {
applyDefaultHierarchyTemplate()
androidTarget {
publishLibraryVariants("release")
}
Expand All @@ -18,6 +19,10 @@ kotlin {
browser()
}

iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets {
val commonMain by getting {
dependencies {
Expand Down
4 changes: 4 additions & 0 deletions data-table/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ group = "com.seanproctor"
version = extra["datatable.version"] as String

kotlin {
applyDefaultHierarchyTemplate()
androidTarget {
publishLibraryVariants("release")
}
jvm()
js {
browser()
}
iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets {
val commonMain by getting {
Expand Down
4 changes: 4 additions & 0 deletions demo-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ plugins {
}

kotlin {
applyDefaultHierarchyTemplate()
androidTarget()
jvm()
js {
browser()
}
iosX64()
iosArm64()
iosSimulatorArm64()
sourceSets {
val commonMain by getting {
dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.seanproctor.datatable.demo

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.seanproctor.datatable.DataTableScrollState

@Composable
actual fun VerticalScrollbar(scrollState: DataTableScrollState, modifier: Modifier) {}

@Composable
actual fun HorizontalScrollbar(scrollState: DataTableScrollState, modifier: Modifier) {}
3 changes: 3 additions & 0 deletions ios/app/Configuration/Config.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TEAM_ID=
BUNDLE_ID=com.seanproctor.datatable.demo.ios.ComposeDataTable
APP_NAME=Compose Data Table
Loading

0 comments on commit 14fc869

Please sign in to comment.