-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from jacobras/compose-kmp
Migrate to Compose multiplatform
- Loading branch information
Showing
32 changed files
with
599 additions
and
410 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,24 @@ | ||
name: Publish | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Publish Library | ||
env: | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
run: ./gradlew publishAllPublicationsToMavenCentral --no-configuration-cache |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
plugins { | ||
kotlin("jvm") version libs.versions.kotlin apply false | ||
kotlin("multiplatform") version libs.versions.kotlin apply false | ||
kotlin("android") version libs.versions.kotlin apply false | ||
id("com.android.application") version libs.versions.agp apply false | ||
id("com.android.library") version libs.versions.agp apply false | ||
id("org.jetbrains.kotlin.android") version libs.versions.kotlin apply false | ||
id("org.jetbrains.compose") version libs.versions.compose.multiplatform apply false | ||
} |
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 |
---|---|---|
@@ -1,52 +1,94 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
import org.gradle.kotlin.dsl.implementation | ||
import org.gradle.kotlin.dsl.libs | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
id("org.jetbrains.compose") | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.vanniktech.maven.publish") version "0.27.0" | ||
} | ||
|
||
group = "nl.jacobras" | ||
version = "2.0.0" | ||
|
||
mavenPublishing { | ||
publishToMavenCentral(SonatypeHost.S01, true) | ||
signAllPublications() | ||
|
||
@Suppress("UnstableApiUsage") | ||
pom { | ||
name.set("Compose Action Menu") | ||
description.set("An easy to use action/overflow menu for Jetpack Compose") | ||
url.set("https://github.com/jacobras/composeactionmenu") | ||
|
||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("jacobras") | ||
name.set("Jacob Ras") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/jacobras/ComposeActionMenu") | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdk = 33 | ||
compileSdk = 34 | ||
namespace = "nl.jacobras.composeactionmenu" | ||
|
||
buildFeatures { | ||
compose = true | ||
} | ||
defaultConfig { | ||
minSdk = 21 | ||
targetSdk = 33 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
buildTypes { | ||
named("release") { | ||
isMinifyEnabled = false | ||
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
dependencies { | ||
// BoMs | ||
implementation(platform(libs.compose.bom)) | ||
kotlin { | ||
applyDefaultHierarchyTemplate() | ||
|
||
androidTarget { | ||
publishLibraryVariants("release") | ||
} | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
jvm("desktop") | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(compose.foundation) | ||
implementation(compose.material) | ||
implementation(compose.ui) | ||
} | ||
} | ||
val androidMain by getting { | ||
dependencies { | ||
implementation(compose.uiTooling) | ||
} | ||
} | ||
} | ||
|
||
jvmToolchain(17) | ||
} | ||
|
||
implementation(libs.compose.activity) | ||
implementation(libs.compose.compiler) | ||
implementation(libs.compose.foundation) | ||
implementation(libs.compose.material) | ||
implementation(libs.compose.ui) | ||
implementation(libs.compose.ui.tooling) | ||
// From https://github.com/gradle/gradle/issues/26091#issuecomment-1722947958 | ||
tasks.withType<AbstractPublishToMaven>().configureEach { | ||
val signingTasks = tasks.withType<Sign>() | ||
mustRunAfter(signingTasks) | ||
} |
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.