diff --git a/.github/workflows/build-development.yaml b/.github/workflows/build-development.yaml index 56f7954..2b1b902 100644 --- a/.github/workflows/build-development.yaml +++ b/.github/workflows/build-development.yaml @@ -8,9 +8,10 @@ on: - 'master' env: - NEXUS_URL: ${{ secrets.NEXUS_URL }} - NEXUS_USERID: ${{ secrets.NEXUS_USERID }} - NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + REPO_ARTIFACTS_URL: ${{ secrets.REPO_ARTIFACTS_URL }} + REPO_PUBLISH_URL: ${{ secrets.REPO_PUBLISH_URL }} + REPO_USERID: ${{ secrets.REPO_USERID }} + REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} jobs: build: diff --git a/.github/workflows/publish_release.yaml b/.github/workflows/publish_release.yaml index 8c05f50..fa0c54c 100644 --- a/.github/workflows/publish_release.yaml +++ b/.github/workflows/publish_release.yaml @@ -8,9 +8,9 @@ on: branches: - 'datastore-kotlin-impl' env: - NEXUS_URL: ${{ secrets.NEXUS_URL }} - NEXUS_USERID: ${{ secrets.NEXUS_USERID }} - NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + REPO_PUBLISH_URL: ${{ secrets.REPO_PUBLISH_URL }} + REPO_USERID: ${{ secrets.REPO_USERID }} + REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} jobs: build: @@ -23,4 +23,4 @@ jobs: run: ./gradlew persistent-cookie-jar-okhttp:test - name: Publish Library - run: ./gradlew --stacktrace -PnexusURL=$NEXUS_URL -PnexusUserName=$NEXUS_USERID -PnexusUserPassword=$NEXUS_PASSWORD clean persistent-cookie-jar-okhttp:assembleRelease publish + run: ./gradlew --stacktrace -PrepoPublishURL=$REPO_PUBLISH_URL -PrepoUserName=$REPO_USERID -PrepoUserPassword=$REPO_PASSWORD clean persistent-cookie-jar-okhttp:assembleRelease publish diff --git a/gradle.properties b/gradle.properties index f21309d..8dd67da 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,4 +12,4 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true diff --git a/persistent-cookie-jar-okhttp/build.gradle.kts b/persistent-cookie-jar-okhttp/build.gradle.kts index 9145217..ef63652 100644 --- a/persistent-cookie-jar-okhttp/build.gradle.kts +++ b/persistent-cookie-jar-okhttp/build.gradle.kts @@ -49,15 +49,16 @@ dependencies { afterEvaluate { publishing { // These values are provided by the CI environment, args are retrieved from the command line. - val nexusURL: String? by project - val nexusUserName: String? by project - val nexusUserPassword: String? by project + val repoPublishURL: String? by project + val repoUserName: String? by project + val repoUserPassword: String? by project + repositories { maven { - url = uri(nexusURL ?: "") + url = uri(repoPublishURL ?: "") credentials { - username = nexusUserName - password = nexusUserPassword + username = repoUserName + password = repoUserPassword } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 7dc96d6..fcae66f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,21 +7,23 @@ pluginManagement { //do Nothing } }.also { - val nexusURL: String = System.getenv("NEXUS_URL") ?: it.getProperty("NEXUS_URL") - val nexusUsername: String = System.getenv("NEXUS_USERID") ?: it.getProperty("NEXUS_USERID") - val nexusPassword: String = System.getenv("NEXUS_PASSWORD") ?: it.getProperty("NEXUS_PASSWORD") + print(it) - extra.set("nexusURL", nexusURL) - extra.set("nexusUsername", nexusUsername) - extra.set("nexusPassword", nexusPassword) + val repoArtifactsURL: String = System.getenv("REPO_ARTIFACTS_URL") ?: it.getProperty("REPO_ARTIFACTS_URL") + val repoUsername: String = System.getenv("REPO_USERID") ?: it.getProperty("REPO_USERID") + val repoPassword: String = System.getenv("REPO_PASSWORD") ?: it.getProperty("REPO_PASSWORD") + + extra.set("repoArtifactsURL", repoArtifactsURL) + extra.set("repoUsername", repoUsername) + extra.set("repoPassword", repoPassword) } repositories { maven { - url = uri(extra.get("nexusURL") as String) + url = uri(extra.get("repoArtifactsURL") as String) credentials { - username = extra.get("nexusUsername") as String - password = extra.get("nexusPassword") as String + username = extra.get("repoUsername") as String + password = extra.get("repoPassword") as String } } } @@ -30,10 +32,10 @@ dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { maven { - url = uri(extra.get("nexusURL") as String) + url = uri(extra.get("repoArtifactsURL") as String) credentials { - username = extra.get("nexusUsername") as String - password = extra.get("nexusPassword") as String + username = extra.get("repoUsername") as String + password = extra.get("repoPassword") as String } } }