Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASAA-122 - Corrected Publishing and cleaned up build.gradle.kts #3

Merged
merged 4 commits into from
Dec 22, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
name: Gradle Package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
runs-on: macOS-latest
permissions:
contents: read
packages: write
Expand All @@ -32,14 +32,14 @@ jobs:
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
uses: gradle/gradle-build-action@v2.10.0
uses: gradle/gradle-build-action@v2.11.0
with:
arguments: build

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@v2.10.0
uses: gradle/gradle-build-action@v2.11.0
with:
arguments: publish
env:
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Gradle
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.caching=true
publishing.group=com.github.bottlerocketstudios

#Kotlin
kotlin.code.style=official
Expand Down
26 changes: 5 additions & 21 deletions kmp-launchpad-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ plugins {
}

kotlin {
applyDefaultHierarchyTemplate()

androidTarget {
publishAllLibraryVariants()
compilations.all {
Expand Down Expand Up @@ -66,35 +68,17 @@ ktlint {
ignoreFailures.set(true)
}

group = "com.github.bottlerocketstudios"
group = extra["publishing.group"] as String
version = libs.versions.launchpad.compose.get()

publishing {
publications {
register<MavenPublication>("$name-release") {
artifactId = name.lowercase()
from(components["kotlin"])

pom {
description = "Compose components for Launchpad"

licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
}
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/BottleRocketStudios/KMP-LaunchPad-Compose")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
username = System.getenv("GITHUB_ACTOR") ?: System.getenv("LOCAL_GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN") ?: System.getenv("LOCAL_GITHUB_TOKEN")
}
}
}
Expand Down