diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2fb3bec..3d100e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,4 +17,4 @@ jobs: distribution: temurin java-version: 17 - name: Build - run: ./gradlew -PltsUser=${{ secrets.LTS_CUSTOMER_NAME }} -PltsPassword=${{ secrets.LTS_CUSTOMER_PASSWORD }} check + run: ./gradlew -PltsMavenUser=${{ secrets.LTS_MAVEN_USER }} -PltsMavenPassword=${{ secrets.LTS_MAVEN_PASSWORD }} check diff --git a/README.md b/README.md index 8d57537..cfc1ee0 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ The LTS version of the http4k libraries are hosted in a private Maven repository Configuring Gradle to use the private Maven repo can be done by using a custom repository: ```kotlin -val ltsUser: String by project -val ltsPassword: String by project +val ltsMavenUser: String by project +val ltsMavenPassword: String by project repositories { maven { credentials { - username = ltsUser - password = ltsPassword + username = ltsMavenUser + password = ltsMavenPassword } url = URI("https://maven.http4k.org") } @@ -25,8 +25,8 @@ repositories { } ``` -To set up access in your Gradle build, you will need to pass the credentials in some fashion. The easiest way to do this is to put them in your `gradle.properties` or to pass them on the command line. The properties are `ltsUser` and `ltsPassword`: +To set up access in your Gradle build, you will need to pass the credentials in some fashion. The easiest way to do this is to put them in your `gradle.properties` or to pass them on the command line. The properties are `ltsMavenUser` and `ltsMavenPassword`: ```shell -./gradlew -PltsUser=lts_username -PltsPassword=secret_password check +./gradlew -PltsMavenUser=lts_username -PltsMavenPassword=secret_password check ``` diff --git a/build.gradle.kts b/build.gradle.kts index 1ecd88f..e169853 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,14 +20,14 @@ kotlin { } } -val ltsUser: String by project -val ltsPassword: String by project +val ltsMavenUser: String = project.findProperty("ltsMavenUser") as? String ?: System.getenv("LTS_MAVEN_USER") +val ltsMavenPassword: String = project.findProperty("ltsMavenPassword") as? String ?: System.getenv("LTS_MAVEN_PASSWORD") repositories { maven { credentials { - username = ltsUser - password = ltsPassword + username = ltsMavenUser + password = ltsMavenPassword } url = URI("https://maven.http4k.org") } diff --git a/gradle.properties b/gradle.properties index 1d02993..7d08a8e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1 @@ http4kVersion=4.48.0.1 -ltsUser=replace_me -ltsPassword=replace_me