diff --git a/.github/workflows/release-sdk.yaml b/.github/workflows/release-sdk.yaml index f0d17df3..30e8c902 100644 --- a/.github/workflows/release-sdk.yaml +++ b/.github/workflows/release-sdk.yaml @@ -2,12 +2,6 @@ name: Release SDK to Maven Central on: workflow_dispatch: -# inputs: -# version: -# description: | -# The version to release. -# Add -SNAPSHOT to release a snapshot version. -# default: '0.0.1-SNAPSHOT' jobs: release-sdk: @@ -18,37 +12,12 @@ jobs: - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: 'temurin' server-id: oss-sonatype server-username: SONATYPE_USERNAME server-password: SONATYPE_PASSWORD gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - -# - name: Prepare Environment and Version -# id: prepare -# run: | -# git config user.name s-github-actions -# git config user.email s-github-actions@expediagroup.com -# echo "branch_name=release/${{ inputs.version }}" >> $GITHUB_OUTPUT - -# - name: Prepare Release -# id: prepare_release -# run: | -# cd code -# gradle --no-daemon versionsSet -Pversion=${{ inputs.version }} -# -# - name: Create PR -# uses: peter-evans/create-pull-request@v7 -# with: -# branch: "publish-v${{ inputs.version }}" -# commit-message: "chore: prepare release ${{ inputs.version }}" -# title: "chore: Publish v${{ inputs.version }}" -# body: | -# This PR updates the version of the SDK to v`${{ inputs.version }}`. -# Generated by the EG SDK generator. -# add-paths: | -# code/* - name: Publish env: diff --git a/code/build.gradle b/code/build.gradle index 6ffd5299..a1cc810b 100644 --- a/code/build.gradle +++ b/code/build.gradle @@ -1,19 +1,16 @@ import org.jetbrains.dokka.gradle.DokkaTask -\ - - -buildscript { - repositories { - mavenCentral { - url = uri("https://repo.maven.apache.org/maven2") - credentials { - username = System.getenv("SONATYPE_USERNAME") ?: findProperty('ARTIFACTORY_USER') - password = System.getenv("SONATYPE_PASSWORD") ?: findProperty('ARTIFACTORY_PASS') - } - } - } -} +//buildscript { +// repositories { +// mavenCentral { +// url = uri("https://repo.maven.apache.org/maven2") +// credentials { +// username = System.getenv("SONATYPE_USERNAME") ?: findProperty('ARTIFACTORY_USER') +// password = System.getenv("SONATYPE_PASSWORD") ?: findProperty('ARTIFACTORY_PASS') +// } +// } +// } +//} plugins { id 'org.jetbrains.kotlin.jvm' version '1.9.22' @@ -30,10 +27,10 @@ version = "0.0.1-SNAPSHOT" repositories { mavenCentral { url = uri("https://repo.maven.apache.org/maven2") - credentials { - username = System.getenv("SONATYPE_USERNAME") ?: findProperty('ARTIFACTORY_USER') - password = System.getenv("SONATYPE_PASSWORD") ?: findProperty('ARTIFACTORY_PASS') - } +// credentials { +// username = System.getenv("SONATYPE_USERNAME") ?: findProperty('ARTIFACTORY_USER') +// password = System.getenv("SONATYPE_PASSWORD") ?: findProperty('ARTIFACTORY_PASS') +// } } } @@ -69,15 +66,15 @@ java { targetCompatibility = JavaVersion.VERSION_11 } -subprojects { - afterEvaluate { project -> - if (project.name == System.getenv('EXCLUDE_MODULE')) { - // Disable all tasks for this module - tasks.configureEach { task -> task.enabled = false - } - } - } -} +//subprojects { +// afterEvaluate { project -> +// if (project.name == System.getenv('EXCLUDE_MODULE')) { +// // Disable all tasks for this module +// tasks.configureEach { task -> task.enabled = false +// } +// } +// } +//} publishing { publications { @@ -132,18 +129,18 @@ publishing { } -tasks.register('versionsSet') { - doLast { - def pattern = ~/(\R|^)(version\s*=\s*)([-.A-Z0-9]+)(\R|$)/ - String gradleProperties = file('gradle.properties').text - String currentVersion = (gradleProperties =~ pattern)[0][3] - println("Current version: $currentVersion") - println("Project version: ${project.version}") - if (project.version != currentVersion) { - file('gradle.properties').text = gradleProperties.replaceFirst(pattern, "\$1\$2${project.version}\$4") - } - } -} +//tasks.register('versionsSet') { +// doLast { +// def pattern = ~/(\R|^)(version\s*=\s*)([-.A-Z0-9]+)(\R|$)/ +// String gradleProperties = file('gradle.properties').text +// String currentVersion = (gradleProperties =~ pattern)[0][3] +// println("Current version: $currentVersion") +// println("Project version: ${project.version}") +// if (project.version != currentVersion) { +// file('gradle.properties').text = gradleProperties.replaceFirst(pattern, "\$1\$2${project.version}\$4") +// } +// } +//} tasks.withType(DokkaTask.class) {