-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: Bootstrap project and implement env-var provider #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e706f97
Initialize Gradle root project
bencehornak 40c0620
Add env-var provider
bencehornak eb3709b
Add MD files
bencehornak 75ae010
Initialize CI
bencehornak 147599a
Add more Gradle config
bencehornak 9a60105
Add test for platform specific code
bencehornak 35c2e36
Add e2e test for env-var provider
bencehornak 15a0931
Rename test cases
bencehornak d47eb7a
Update paths in release-please-config.json
bencehornak 1e80b86
Remove release please
bencehornak 29bf10b
Document supported platforms of env-var provider
bencehornak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # | ||
| # https://help.github.com/articles/dealing-with-line-endings/ | ||
| # | ||
| # Linux start script should use lf | ||
| /gradlew text eol=lf | ||
|
|
||
| # These are Windows script files and should use crlf | ||
| *.bat text eol=crlf | ||
|
|
||
| # Binary files should be left untouched | ||
| *.jar binary | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Code of Conduct | ||
|
|
||
| Please refer to the [OpenFeature community page](https://openfeature.dev/community/#code-of-conduct) for more information on Code of Conduct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| pull_request: | ||
| branches: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| Tests: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Run checks | ||
| run: ./gradlew check --no-daemon --stacktrace |
beeme1mr marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: 'Lint PR' | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
|
|
||
| jobs: | ||
| main: | ||
| name: Validate PR title | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v5 | ||
| id: lint_pr_title | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - uses: marocchino/sticky-pull-request-comment@v2 | ||
| # When the previous steps fails, the workflow would stop. By adding this | ||
| # condition you can continue the execution with the populated error message. | ||
| if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
| with: | ||
| header: pr-title-lint-error | ||
| message: | | ||
| Hey there and thank you for opening this pull request! 👋🏼 | ||
|
|
||
| We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | ||
|
|
||
| Details: | ||
|
|
||
| ``` | ||
| ${{ steps.lint_pr_title.outputs.error_message }} | ||
| ``` | ||
|
|
||
| # Delete a previous comment when the issue has been resolved | ||
| - if: ${{ steps.lint_pr_title.outputs.error_message == null }} | ||
| uses: marocchino/sticky-pull-request-comment@v2 | ||
| with: | ||
| header: pr-title-lint-error | ||
| delete: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| name: Run Release Please | ||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| # Release-please creates a PR that tracks all changes | ||
| steps: | ||
| - uses: google-github-actions/release-please-action@v3 | ||
| id: release | ||
| with: | ||
| release-type: simple | ||
| command: manifest | ||
| token: ${{secrets.GITHUB_TOKEN}} | ||
| default-branch: main | ||
|
|
||
| - name: Dump Release Please Output | ||
| env: | ||
| RELEASE_PLEASE_OUTPUT: ${{ toJson(steps.release.outputs) }} | ||
| run: | | ||
| echo "$RELEASE_PLEASE_OUTPUT" | ||
|
|
||
| outputs: | ||
| release_created: ${{ steps.release.outputs.release_created }} | ||
|
|
||
| kotlin-release: | ||
| needs: release-please | ||
| runs-on: ubuntu-latest | ||
| if: ${{ needs.release-please.outputs.release_created }} | ||
| steps: | ||
| # The logic below handles the github release: | ||
| - name: Cache Gradle and wrapper | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-gradle- | ||
|
|
||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Configure GPG Key | ||
| run: | | ||
| echo -n "$GPG_SIGNING_KEY" | gpg --import | ||
| gpg --pinentry-mode=loopback --export-secret-key 08C5EC5C > ~/.gnupg/secring.gpg | ||
| env: | ||
| GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
|
||
| - name: Add signing secrets to gradle.properties | ||
| run: | | ||
| mkdir -p ~/.gradle/ | ||
| echo "signing.keyId=08C5EC5C" >> ~/.gradle/gradle.properties | ||
| echo "signing.secretKeyRingFile=/home/runner/.gnupg/secring.gpg" >> ~/.gradle/gradle.properties | ||
| echo "signing.password=$GPG_SIGNING_KEY_PASSWORD" >> ~/.gradle/gradle.properties | ||
| env: | ||
| GPG_SIGNING_KEY_ID: ${{ secrets.GPG_SIGNING_KEY_ID }} | ||
| GPG_SIGNING_KEY_PASSWORD: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} | ||
|
|
||
| - name: Set up JDK 11 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| java-version: 11 | ||
| distribution: 'zulu' | ||
|
|
||
| - name: Grant Permission for Gradlew to Execute | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Publish to Sonatype | ||
| env: | ||
| OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
| OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
| run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon --stacktrace | ||
|
|
||
| - name: Clean up signing secrets | ||
| run: rm ~/.gradle/gradle.properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,14 @@ | ||
| # Compiled class file | ||
| *.class | ||
| # Ignore Gradle project-specific cache directory | ||
| .gradle | ||
|
|
||
| # Log file | ||
| *.log | ||
|
|
||
| # BlueJ files | ||
| *.ctxt | ||
|
|
||
| # Mobile Tools for Java (J2ME) | ||
| .mtj.tmp/ | ||
| # Kotlin Gradle plugin data, see https://kotlinlang.org/docs/whatsnew20.html#new-directory-for-kotlin-data-in-gradle-projects | ||
| .kotlin/ | ||
|
|
||
| # Package Files # | ||
| *.jar | ||
| *.war | ||
| *.nar | ||
| *.ear | ||
| *.zip | ||
| *.tar.gz | ||
| *.rar | ||
| # Ignore Gradle build output directory | ||
| build | ||
|
|
||
| # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
| hs_err_pid* | ||
| replay_pid* | ||
| # Ignore IntelliJ files | ||
| .idea | ||
|
|
||
| # Kotlin Gradle plugin data, see https://kotlinlang.org/docs/whatsnew20.html#new-directory-for-kotlin-data-in-gradle-projects | ||
| .kotlin/ | ||
| # Ignore Kotlin files | ||
| .kotlin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {".":"0.1.0"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Changelog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Contributing | ||
|
|
||
| TODO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Owners | ||
|
|
||
| - See [CONTRIBUTING.md](CONTRIBUTING.md) for general contribution guidelines. | ||
|
|
||
| ## Core Developers | ||
|
|
||
| - Fabrizio Demaria (fabriziodemaria, Spotify) | ||
| - Nicklas Lundin (nicklasl, Spotify) | ||
| - Nicky Bondarenko (nickybondarenko, Spotify) | ||
| - Todd Baert (toddbaert, Dynatrace) | ||
| - Vahid Torkaman (vahidlazio, Spotify) | ||
|
|
||
| See https://github.com/open-feature/community/blob/main/config/open-feature/sdk-kotlin/workgroup.yaml. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,28 @@ | ||
| # kotlin-sdk-contrib | ||
| # OpenFeature Kotlin Contributions | ||
|
|
||
| > [!WARNING] | ||
| > This repository is not fully initialized for the moment, proceed at your own risk. | ||
|
|
||
| This repository is intended for OpenFeature contributions which are not included in the [OpenFeature Kotlin SDK](https://github.com/open-feature/kotlin-sdk). | ||
|
|
||
| The project includes: | ||
|
|
||
| - [Providers](./providers) | ||
| - [Hooks](./hooks) | ||
|
|
||
| ## Releases | ||
|
|
||
| This repo uses _Release Please_ to release packages. Release Please sets up a running PR that tracks all changes for the library components, and maintains the versions according to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), generated when [PRs are merged](https://github.com/amannn/action-semantic-pull-request). When Release Please's running PR is merged, any changed artifacts are published. | ||
|
|
||
| ### Software Bill of Materials (SBOM) | ||
|
|
||
| We publish SBOMs with all of our releases. You can find them in Maven Central alongside the artifacts. | ||
|
|
||
| ## Contributing | ||
|
|
||
| see: [CONTRIBUTING.md](./CONTRIBUTING.md) | ||
|
|
||
| ## License | ||
|
|
||
| Apache 2.0 - See [LICENSE](./LICENSE) for more information. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| plugins { | ||
| alias(libs.plugins.nexus.publish) | ||
| } | ||
|
|
||
| allprojects { | ||
| extra["groupId"] = "dev.openfeature.kotlin.contrib" | ||
| // x-release-please-start-version | ||
| ext["version"] = "0.1.0" | ||
| // x-release-please-end | ||
| } | ||
| group = project.extra["groupId"].toString() | ||
| version = project.extra["version"].toString() | ||
|
|
||
| nexusPublishing { | ||
| this.repositories { | ||
| sonatype { | ||
| nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
| snapshotRepositoryUrl.set( | ||
| uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"), | ||
| ) | ||
| username = System.getenv("OSSRH_USERNAME") | ||
| password = System.getenv("OSSRH_PASSWORD") | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| org.gradle.configuration-cache=true | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [versions] | ||
| kotlin = "2.1.21" | ||
| open-feature-kotlin-sdk = "0.4.1" | ||
|
|
||
| [libraries] | ||
| openfeature-kotlin-sdk = { group="dev.openfeature", name="kotlin-sdk", version.ref="open-feature-kotlin-sdk" } | ||
| kotlin-test = { group="org.jetbrains.kotlin", name="kotlin-test", version.ref="kotlin" } | ||
|
|
||
| [plugins] | ||
| kotlin-multiplatform = { id="org.jetbrains.kotlin.multiplatform", version.ref="kotlin" } | ||
| ktlint = { id="org.jlleitschuh.gradle.ktlint", version="12.3.0" } | ||
| nexus-publish = { id="io.github.gradle-nexus.publish-plugin", version="2.0.0" } | ||
| binary-compatibility-validator = { id="org.jetbrains.kotlinx.binary-compatibility-validator", version="0.17.0" } |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.