Skip to content

Commit

Permalink
Merge branch 'compose-1.1' into compose-1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
raamcosta committed Nov 1, 2022
2 parents 8d2ae4f + 23fbbfa commit 6f2cddd
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build
run-name: Testing build.

on:
push:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: release
run-name: Publishing new version to maven central.
on:
push:
branches: [ main, compose-1.1, compose-1.2 ]
tags:
- '*.*.*'

env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyId }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}

jobs:
release:
if: github.ref_name != 'main' && github.ref_name != 'compose-1.1' && github.ref_name != 'compose-1.2'
runs-on: ubuntu-latest

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

- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
arguments: build

- name: Run unit tests
run: ./gradlew test

- name: Publish to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentral
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ fun String.removeInstancesOf(vararg toRemove: String): String {
return result
}

private val keywords: Set<String> = setOf(
"in", "is"
)

fun String.sanitizePackageName(): String {
return split(".")
.joinToString(".") { if (it == "in") "`in`" else it }
.joinToString(".") { if (keywords.contains(it)) "`$it`" else it }
}

private val humps = "(?<=.)(?=\\p{Upper})".toRegex()
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

android.disableAutomaticComponentCreation=true
android.disableAutomaticComponentCreation=true

SONATYPE_AUTOMATIC_RELEASE=true

0 comments on commit 6f2cddd

Please sign in to comment.