Skip to content

Commit

Permalink
ASAA-122 - Corrected Publishing and cleaned up build.gradle.kts (#3)
Browse files Browse the repository at this point in the history
* ASAA-122 - Corrected Publishing and cleaned up build.gradle.kts

* ASAA-122 - Added back tests dependencies

* ASAA-122 - Disabled actions for now

* ASAA-122 - Changed local variable name
  • Loading branch information
br-Emery authored Dec 22, 2023
1 parent 9d71492 commit d04ff1c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
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

0 comments on commit d04ff1c

Please sign in to comment.