Skip to content

Commit

Permalink
Updated scripts to handle version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
Reedyuk committed Nov 24, 2022
1 parent 0002c18 commit 61d9376
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Update version property
uses: Reedyuk/[email protected]
with:
path: 'gradle.properties'
path: 'library/gradle.properties'
property: 'MODULE_VERSION_NUMBER'
value: ${{ github.ref_name }}
- name: Setup cocoapods
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
view_top: 1
- uses: vimtor/action-zip@v1
with:
files: build/XCFrameworks/release/
files: library/build/XCFrameworks/release/
dest: build/${{ github.ref_name }}.zip
- name: upload iOS artifact to release
uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
val MODULE_PACKAGE_NAME: String by project
val MODULE_NAME: String by project
val MODULE_VERSION_NUMBER: String by project
val PUBLISH_NAME: String by project

group = MODULE_PACKAGE_NAME
version = MODULE_VERSION_NUMBER
Expand Down Expand Up @@ -108,7 +109,6 @@ val javadocJar by tasks.creating(Jar::class) {

publishing {
val OPEN_SOURCE_REPO: String by project
val PUBLISH_NAME: String by project
val PUBLISH_DESCRIPTION: String by project
val PUBLISH_URL: String by project
val POM_DEVELOPER_ID: String by project
Expand Down
2 changes: 1 addition & 1 deletion library/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MODULE_VERSION_NUMBER=0.0.1
MODULE_NAME=template-kotlin-library

OPEN_SOURCE_REPO=https://oss.sonatype.org/service/local/staging/deploy/maven2/
PUBLISH_NAME=
PUBLISH_NAME=template-kotlin-library
PUBLISH_DESCRIPTION=
PUBLISH_URL=https://github.com/MyUNiDAYS/template-kotlin-library

Expand Down
14 changes: 14 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
import java.util.Properties

include(":library")

val properties = Properties()
val propertiesFile = File("library/gradle.properties")
if (propertiesFile.exists()) {
properties.load(propertiesFile.inputStream())
}
val PUBLISH_NAME = properties.getProperty("PUBLISH_NAME")

rootProject.name = PUBLISH_NAME
rootProject.children.forEach {
it.name = PUBLISH_NAME
}

0 comments on commit 61d9376

Please sign in to comment.