# Kotlin Symbol Processing API

Welcome to KSP!

Kotlin Symbol Processing (KSP) is an API that you can use to develop
lightweight compiler plugins. KSP provides a simplified compiler plugin
API that leverages the power of Kotlin while keeping the learning curve at
a minimum. Compared to KAPT, annotation processors that use KSP can run up to 2x faster.

Most of the documentation of KSP can be found on [kotlinlang.org](https://kotlinlang.org/docs/ksp-overview.html). Here are some handy links:

* [Overview](https://kotlinlang.org/docs/ksp-overview.html)
* [Quickstart](https://kotlinlang.org/docs/ksp-quickstart.html)
* [Libraries that support KSP](https://kotlinlang.org/docs/ksp-overview.html#supported-libraries)
* [Why KSP?](https://kotlinlang.org/docs/ksp-why-ksp.html)
* [Examples](https://kotlinlang.org/docs/ksp-examples.html)
* [How KSP models Kotlin code](https://kotlinlang.org/docs/ksp-additional-details.html)
* [Reference for Java annotation processor authors](https://kotlinlang.org/docs/ksp-reference.html)
* [Incremental processing notes](https://kotlinlang.org/docs/ksp-incremental.html)
* [Multiple round processing notes](https://kotlinlang.org/docs/ksp-multi-round.html)
* [KSP on multiplatform projects](https://kotlinlang.org/docs/ksp-multiplatform.html)
* [Running KSP from command line](https://kotlinlang.org/docs/ksp-command-line.html)
* [FAQ](https://kotlinlang.org/docs/ksp-faq.html)

For debugging and testing processors, as well as KSP itself, please check [DEVELOPMENT.md](DEVELOPMENT.md)

## KSP2 is in Beta!
KSP2 is a new implementation of the KSP API. It will be faster and easier to use than KSP 1.x. Please refer to the
[KSP2 introduction](docs/ksp2.md) for more details.

### Nightly Builds
Nightly builds of KSP for the latest Kotlin stable releases are published
[here](https://oss.sonatype.org/content/repositories/snapshots/com/google/devtools/ksp/).

```
maven("https://oss.sonatype.org/content/repositories/snapshots")
```

## Feedback and Bug Reporting

[Please let us know what you think about KSP by filing a Github issue](https://github.com/google/ksp/issues)
or connecting with our team in the `#ksp` channel in the
[Kotlin Slack workspace](https://kotlinlang.slack.com/)!

If you are interested in sending PRs, please also check out the [Contributor guide](CONTRIBUTING.md).

## Ongoing and Future Works

Here are some planned features that have not yet been completely implemented:
* Improve support to multiplatform. E.g., running KSP on a subset of targets / sharing computations between targets
* Improve performance. There are a bunch of optimizations to be done!
* Keep fixing bugs!


# Google Cloud Platform Kotlin Samples

This repository holds samples written in Kotlin that demonstrate the Google
Cloud Platform.

## Index

|Path|Description|
|---|---|
|[appengine](appengine)|Basic examples for deploying Kotlin applications to [App Engine for Java 8][appengine].|
|[firestore](firestore)|This sample demonstrates the [Google Cloud Firestore API][firestore-api].|
|[functions](functions)|This sample demonstrates deploying to [Google Cloud Functions][functions].|
|[pubsub](pubsub)|This sample demonstrates the [Google Cloud Pub/Sub API][pubsub-api].|
|[run](run)|Basic examples for deploying Kotlin applications to [Cloud Run][run].|
|[storage](storage)|This sample demonstrates the [Google Cloud Storage API][storage-api].|
|[vision](vision)|This sample demonstrates the [Google Cloud Vision API][vision-api].|
|[emojify](getting-started/android-with-appengine)|Getting started with Server side Kotlin? This app demonstrates an Android frontend written in Kotlin that communicates with a Kotlin backend running on [App Engine for Java 8][appengine].|

The samples use the [Google Cloud Client Library for Java][google-cloud-java].

## Contributing changes.

Entirely new samples and bug fixes are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute.

## Licensing

Code in this repository is licensed under the Apache 2.0. See [LICENSE](LICENSE).

[appengine]: https://cloud.google.com/appengine/docs/standard/java/runtime-java8
[storage-api]: https://cloud.google.com/storage/
[vision-api]: https://cloud.google.com/vision/
[pubsub-api]: https://cloud.google.com/pubsub/
[run]: https://cloud.google.com/run/
[firestore-api]: https://cloud.google.com/firestore/
[functions]: https://cloud.google.com/functions/
[google-cloud-java]: https://googlecloudplatform.github.io/google-cloud-java


# SubwayTooter

Mastodon client app for Android phone/tablet.

## Requirements
- Android 8.0 or later

## Supported SNS service
- Mastodon https://joinmastodon.org/

## Features
- **Multiple account**
- **Multiple column** with freely rearrangement
- **Pseudo account** that can read instance timeline without login
- **Cross account action** that can fav/boost/reply toots or follow users over accounts/instances
- **Emoji** same glyphs as the PC browser version
- **Custom emoji** fully supported
- **Tablet mode** that shows multiple columns at once
- **Many filters** media TL, app mute, word mute, regex filter, etc.
- **Auto CW** that folds very long texts automatically
- **Push notification** (Google Play service required. if not found, this app uses pull notification 15 min period.)
- Relatively fast support for Mastodon's new feature

## Install

### from Github release page
you can find APK files in assets section in release pages.
- (notice: you may want to skip **pre-release** badged release.)
- https://github.com/tateisu/SubwayTooter/releases

### from F-Droid(IzzyOnDroid repo.)
by adding IzzyOnDroid repo, you can find Subway Tooter on F-droid app.
- F-Droid https://www.f-droid.org/
- IzzyOnDroid repo. https://apt.izzysoft.de/fdroid/index/info
- ST's page on IzzyOnDroid repo https://android.izzysoft.de/repo/apk/jp.juggler.subwaytooter.noFcm (noFcm variant)

## Author

tateisu@mastodon.juggler.jp

## Resources
- Official blog (JP) http://subwaytooter.hatenadiary.jp/
- Matrix room https://matrix.juggler.jp/#/#subwayTooter:matrix.juggler.jp

## Donation?
- Amazon(jp) wish list http://amzn.asia/axmNivM
- Fantia https://fantia.jp/fanclubs/8239


😻 In-App Subscriptions Made Easy 😻

[![License](https://img.shields.io/github/license/RevenueCat/purchases-android.svg?style=flat)](https://github.com/RevenueCat/purchases-android/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release/RevenueCat/purchases-android.svg?style=flat)](https://github.com/RevenueCat/purchases-android/releases)

RevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support. Our open-source framework provides a backend and a wrapper around StoreKit and Google Play Billing to make implementing in-app purchases and subscriptions easy.

Whether you are building a new app or already have millions of customers, you can use RevenueCat to:

  * Fetch products, make purchases, and check subscription status with our [native SDKs](https://docs.revenuecat.com/docs/installation).
  * Host and [configure products](https://docs.revenuecat.com/docs/entitlements) remotely from our dashboard.
  * Analyze the most important metrics for your app business [in one place](https://docs.revenuecat.com/docs/charts).
  * See customer transaction histories, chart lifetime value, and [grant promotional subscriptions](https://docs.revenuecat.com/docs/customers).
  * Get notified of real-time events through [webhooks](https://docs.revenuecat.com/docs/webhooks).
  * Send enriched purchase events to analytics and attribution tools with our easy integrations.

Sign up to [get started for free](https://app.revenuecat.com/signup).

## Purchases

*Purchases* is the client for the [RevenueCat](https://www.revenuecat.com/) subscription and purchase tracking system. It is an open source framework that provides a wrapper around `BillingClient` and the RevenueCat backend to make implementing in-app subscriptions in `Android` easy - receipt validation and status tracking included!

## Migration Guides
| Description | Link |
| --- | --- |
| Migrating from v4.x.x to v5.x.x | [V5 API Migration Guide](./migrations/v5-MIGRATION.md) |
| Migrating from v5.x.x to v6.x.x | [V6 API Migration Guide](./migrations/v6-MIGRATION.md) |

## RevenueCat SDK Features
|   | RevenueCat |
| --- | --- |
✅ | Server-side receipt validation
➡ | [Webhooks](https://docs.revenuecat.com/docs/webhooks) - enhanced server-to-server communication with events for purchases, renewals, cancellations, and more
🎯 | Subscription status tracking - know whether a user is subscribed whether they're on iOS, Android or web
📊 | Analytics - automatic calculation of metrics like conversion, mrr, and churn
📝 | [Online documentation](https://docs.revenuecat.com/docs) up to date
🔀 | [Integrations](https://www.revenuecat.com/integrations) - over a dozen integrations to easily send purchase data where you need it
💯 | Well maintained - [frequent releases](https://github.com/RevenueCat/purchases-android/releases)
📮 | Great support - [Help Center](https://revenuecat.zendesk.com)

## Getting Started
For more detailed information, you can view our complete documentation at [docs.revenuecat.com](https://docs.revenuecat.com/docs).

Please follow the [Quickstart Guide](https://docs.revenuecat.com/docs/) for more information on how to install the SDK.

Or view / build our Android sample app:
- [MagicWeather](examples/MagicWeather) (open it on a different Android Studio window)

## Requirements
- Java 8+
- Kotlin 1.7.0+
- Minimum target: Android 5.0+ (API level 21+)

## SDK Reference
Our full SDK reference [can be found here](https://sdk.revenuecat.com/android/index.html).

## Contributing
Contributions are always welcome! To learn how you can contribute, please see the [Contributing Guide](./CONTRIBUTING.md).


[![Release](https://github.com/spinnaker/keel/actions/workflows/periodic_release.yml/badge.svg)](https://github.com/spinnaker/keel/actions/workflows/periodic_release.yml)

# High Level Project Overview
For a high level overview of the Managed Delivery project and its goals, [check out our introductory post on the Spinnaker blog](https://blog.spinnaker.io/managed-delivery-evolving-continuous-delivery-at-netflix-eb74877fb33c).

Continue reading for technical architecture, or check out our [FAQ section](FAQ.md) for more information about what we're building. Join us in the [#sig-spinnaker-as-code](https://slack.com/app_redirect?team=T091CRSGH&channel=CERACDPDZ) channel on the [Spinnaker Slack workspace](http://join.spinnaker.io/) if you have questions or want to get involved!

# Keel Architecture

This document describes the architecture of Spinnaker’s Keel service, which is responsible for the bulk of the functionality behind Managed Delivery.

## Terminology

### Resources

Resources model the specification for a concrete thing or set of homogeneous things in the cloud. Each distinct type of resource is defined by its _API version_ and _kind_. For example:

*   _EC2 Cluster_: a specification for a set of homogeneous auto-scaling groups deployed in one or more regions.
*   _EC2 Security Group_: a specification for a  set of homogeneous security groups existing in one or more regions.
*   _EC2 Classic _or_ Application Load Balancer_: a specification for a set of homogeneous load balancers existing in one or more regions.
*   _Bakery Image_: a specification for an AMI derived from successive versions of an artifact.

The representation of resources is consciously designed around the equivalent concept in Kubernetes and we model resources using a format similar to Kubernetes’ [CRD](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/) format.

### Artifacts

An artifact represents a deployable piece of software that has successive versions. For example a Docker image or a Debian package (that is baked into an AMI for deployment). When resources depend on artifacts, there is no need for a team to update their resource specs when a new version of the artifact is released.

Edge cases exist where some teams may require specific versions of artifacts and may “pin” cluster resources to a particular version, essentially opting out of managed artifact promotion. We support such uses cases via a pinning functionality, although we expect them to be a small minority.

### Environments

Environments group resources and define _constraints_ that determine how and when a new artifact version is allowed (or "promoted") into the environment.

The intention is that environments in the same application should be largely homogeneous, with specific differences in naming (for example differences in Moniker’s concept of a _stack_ or _detail_ field in a resource’s name), or deployment location (for example, at Netflix, the resources in different environments would typically be deployed in different AWS accounts).

A simple example would be an application with three environments:

*   Test: no constraints, the latest artifact version is deployed as soon as it is available.
*   Staging: constrained by a dependence on the stability of the test environment with artifact versions being promoted once a condition is met such as a metric threshold over a defined time, a smoke test has run successfully, etc.
*   Production: constrained by dependency on the stability of the staging environment and additional constraints such as canary success or manual approval. Additional rules may define things such as region-by-region roll-out of new artifact versions, or a veto on managed changes during certain time windows.

### Delivery Configuration Manifests

Environments are further grouped into delivery configuration manifests enabling interdependence between environments (e.g. constraints on one environment requiring successful deployment to another).

## Source of Truth

Keel’s database is in all cases the source of truth for a resource spec. Although we support a [GitOps style workflow](https://spinnaker.io/guides/user/managed-delivery/git-based-workflows/) for teams that want it (and we anticipate this being the majority case), we do not require it. Other teams may prefer to submit their resource definitions to Keel’s REST API. For example, teams that use their own tooling to generate specs for ephemeral resources. We also do not want to be reliant on connectivity to a Git repository in order to determine the desired state of resources.

Note that this is no different than the approach used by systems built around Kubernetes, for instance. The Kubernetes resource database in etcd is always the source of truth. The fact that they may have originated in a Git repository and eventually landed in the database makes absolutely no difference with regard to how those resources are handled.

## Resource Monitoring

At the core of Keel is a resource monitoring loop that regularly compares the _current_ and _desired_ state of a resource and takes steps to bring them into alignment if they differ.

_Resource handlers_ (one for each resource kind) are responsible for reporting the current state and _resolving_ the desired state (see below). The logic for determining if a delta exists is _not_ specific to each handler but is common to all resource types. If a delta exists, the handler is invoked again in order to converge on the desired state. Existing handlers do this by invoking tasks in Orca such as cloning a new version of a server group, resizing a server group, creating a load balancer, etc.

Handlers can, if they wish, take different actions to align current and desired state depending on the details of the delta. For example, a server group that differs from its desired state only in capacity can be resized rather than having to be re-deployed, a cluster whose actual state differs from the desired in only one region can re-deploy the server group in that one region rather than re-creating the entire cluster.

## Artifact Promotion

Similarly to the resource monitoring loop, Keel also regularly evaluates whether new artifact versions meet the constraints on various environments. If they do, the version is promoted to that environment. This will affect the resolution of desired state for resoures that are deployment targets (e.g. compute clusters) within that environment.

## Resolution of Desired State

Resource handlers essentially model three operations:

1. Determine the current state of a particular resource.
2. Resolve the desired state of a particular resource.
3. Take action to reconcile a delta detected between current and desired state.

The first two operations are homeomorphic. They are passed a resource _spec _and return a model of the fully-resolved, fine-grained detail of the actual cloud resources the spec represents. For example, the operations on an EC2 cluster handler accept a “cluster spec” and return a map of server group details keyed by region. The values returned by these two operations are diffed and must be identical if current and desired states are in alignment.

This resolution of desired state means that the resource spec can model things in terms of abstractions. For example:

*   Homogeneous server groups using the specification in multiple environments (in Spinnaker currently users would have to define these separately in the deploy stage of a pipeline).
*   An artifact which is resolved into a specific AMI according to the constraints that exist in the resource’s environment.
*   An EC2 instance type determined by automated recommendation from a central capacity planning team.

Resolution of desired state can change over time which is why it is performed every time a resource is evaluated by the resource monitoring loop. For example:

*   If a new artifact version is promoted to an environment, desired state resolution will include a different AMI the next time it is evaluated.
*   If a centralized team wants to migrate users to a new class of EC2 instance type they can update the recommendation, resulting in a different instance type in the resolved desired state of cluster resources.

Desired state resolution is modular. Multiple _resolvers_ may exist for a resource kind, each being responsible for particular opinions. This modularity not only simplifies testing of resolvers but allows specific resolvers to be enabled or disabled when Keel is deployed. For example, Netflix has specific opinions about the security groups that should be associated with a server group and we have a resolver for that outside of the open-source Keel repository.

## Tooling

Although Keel does some templating-style functionality, for example resources that span multiple regions, we anticipate the need to provide tooling that enables users to define homogeneous sets of resources that appear in all their environments based on templates. Whether this is done as a pre-processing step when files are submitted to Keel, or using external tools is yet to be determined.


# [Oppia Android](https://www.oppia.org)

[![Mailing List](https://img.shields.io/badge/Mailing%20List-Oppia%20Android-dev.svg)](mailto:oppia-android-dev@googlegroups.com) [![Twitter Follow](https://img.shields.io/twitter/follow/oppiaorg.svg?style=social&label=Follow&maxAge=2592000?style=flat-square)](https://twitter.com/oppiaorg) [![GitHub issues by-label](https://img.shields.io/github/issues-search/oppia/oppia-android?label=Available%20starter%20issues&query=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20no%3Aassignee)](https://github.com/oppia/oppia-android/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+no%3Aassignee)

[![Unit Tests (Robolectric -- Gradle)](https://github.com/oppia/oppia-android/actions/workflows/main.yml/badge.svg)](https://github.com/oppia/oppia-android/actions/workflows/main.yml) [![Unit Tests (Robolectric - Bazel)](https://github.com/oppia/oppia-android/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/oppia/oppia-android/actions/workflows/unit_tests.yml) [![Build Tests](https://github.com/oppia/oppia-android/actions/workflows/build_tests.yml/badge.svg)](https://github.com/oppia/oppia-android/actions/workflows/build_tests.yml) [![Static Checks](https://github.com/oppia/oppia-android/actions/workflows/static_checks.yml/badge.svg)](https://github.com/oppia/oppia-android/actions/workflows/static_checks.yml)

Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, making it possible for students to learn by doing while getting feedback.

The Android app is a frontend for Oppia that provides access to Oppia's curated numeracy lessons for users who may not have regular access to internet connectivity, and in a way that can be easily shared across multiple members of the same household. The app is now available in beta and can be installed from the [Play Store](https://play.google.com/store/apps/details?id=org.oppia.android).

Oppia Android is written using Kotlin and Java, and leverages Bazel, databinding, Dagger 2, and AndroidX. See also:

  * [Contributors' wiki](https://github.com/oppia/oppia-android/wiki)
  * [Oppia.org community site](https://www.oppia.org)
  * [File an issue](https://github.com/oppia/oppia-android/issues/new/choose)

You can also sign up to our [email newsletter](https://shorturl.at/CHPY6) for news and updates about the overall Oppia project.

## Installation

Please refer to the [Installing Oppia Android](https://github.com/oppia/oppia-android/wiki/Installing-Oppia-Android) page for full instructions on how to install Oppia-Android on your local machine.

## Contributing

The Oppia project is built by the community for the community. We welcome contributions from everyone, especially new contributors.

You can help with Oppia's development in many ways, including
- [coding](https://github.com/oppia/oppia-android/wiki#instructions-for-making-a-code-change)
- [instructional design & storytelling](https://github.com/oppia/oppia/wiki/Teaching-with-Oppia)
- [UX research](https://github.com/oppia/oppia/wiki/Conducting-research-with-students)
- [creating voiceovers](https://github.com/oppia/oppia/wiki/Instructions-for-voice-artists)
- [design & art](https://github.com/oppia/oppia/wiki/Contributing-to-Oppia%27s-design)
- [documentation](https://github.com/oppia/oppia-android/issues/1723)
- [donating to support our work](https://www.oppia.org/donate)

**Mobile developers**: please see [this wiki page](https://github.com/oppia/oppia-android/wiki#instructions-for-making-a-code-change) for instructions on setting things up and committing changes.

**Other developers**: see [this wiki page](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up) for instructions on setting things up for development on Oppia's frontend or backend.

**All other contributors**: please see our [general contributor guidelines](https://github.com/oppia/oppia/wiki).

## Development
The Oppia Android codebase is specifically designed to streamline development by utilizing design patterns that reduce the likelihood of making mistakes, and by leveraging powerful libraries and technologies to reduce the amount of code that needs to be written. See the [Overview of the Oppia Android codebase](https://github.com/oppia/oppia-android/wiki/Overview-of-the-Oppia-Android-codebase-and-architecture) wiki page for more specifics on the architecture. A brief list of libraries & technologies that the team makes significant use of:
- [Dagger](https://dagger.dev/)
- [Jetpack Databinding](https://developer.android.com/topic/libraries/data-binding)
- [Jetpack LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
- [Kotlin](https://kotlinlang.org/) + [Kotlin Coroutines](https://kotlinlang.org/docs/reference/coroutines-overview.html)
- [Protobuffer](https://developers.google.com/protocol-buffers)
- [Bazel](https://bazel.build/)
- [Espresso](https://developer.android.com/training/testing/espresso) & [Robolectric for testing](http://robolectric.org/)
- And many more

The team puts special emphasis on writing high-quality, readable, maintainable, and well-tested code.

## Support

If you have any feature requests or bug reports, please log them on our [issue tracker](https://github.com/oppia/oppia-android/issues/new/choose).

Please report security issues directly to admin@oppia.org.

## License

The Oppia Android code is released under the [Apache v2 license](https://github.com/oppia/oppia-android/blob/develop/LICENSE).

## Keeping in touch

  * [Discussion forum](https://github.com/oppia/oppia-android/discussions)
  * [Announcements mailing list](http://groups.google.com/group/oppia-announce)

## Social Media
[][twitter]
[][LinkedIn]
[][Facebook]
[][medium]
[][oppia-org-youtube]
[][dev-youtube]

[twitter]: https://twitter.com/oppiaorg
[linkedIn]: https://www.linkedin.com/company/oppia-org/
[medium]: https://medium.com/@oppia.org
[facebook]: https://www.facebook.com/oppiaorg/
[oppia-org-youtube]: https://www.youtube.com/channel/UC5c1G7BNDCfv1rczcBp9FPw
[dev-youtube]: https://www.youtube.com/channel/UCsrAX-oeqm0-NIQzQrdiUkQ


# Backpack Android

> Backpack is a collection of design resources, reusable components and guidelines for creating Skyscanner's products.

[![CI Status](https://github.com/Skyscanner/backpack-android/workflows/Main/badge.svg)](https://github.com/Skyscanner/backpack-android/actions)

[![Maven Central](https://img.shields.io/maven-central/v/net.skyscanner.backpack/backpack-android)](https://search.maven.org/artifact/net.skyscanner.backpack/backpack-android)
[![license](https://img.shields.io/github/license/Skyscanner/backpack-android.svg)](https://github.com/Skyscanner/backpack-android)
[![platform](https://img.shields.io/badge/platform-android-green.svg)](https://github.com/Skyscanner/backpack-android)

Backpack for Android supports two targets: **Android View** system and **Jetpack Compose**.

### Demo application
The Backpack demo application is a good way of referring to the variants available for a component and their correct usage.
The code is available under `/app` directory.
[The app can be downloaded from App Center](https://install.appcenter.ms/orgs/backpack/apps/backpack-android/distribution_groups/everyone)
or by scanning the QR code below.

![QR code](qr.png)

## Installation

Backpack is available through Maven Central. Thus, before adding Backpack to your project,
make sure Maven Central is in your repositories list. Add this to your root `build.gradle`:

```gradle
repositories {
    mavenCentral()
}
```

Add the following dependencies to your `build.gradle` (in your app module) in the `dependencies` block:

```gradle
implementation "net.skyscanner.backpack:backpack-android:bpkVersion" // for Android View system
implementation "net.skyscanner.backpack:backpack-compose:bpkVersion" // for Compose
```

All Backpack components must to be used within `BpkTheme` scope:

Android View system:
```xml
  <style name="AppTheme" parent="BpkTheme">
    <!-- Customize your theme here. -->
  </style>
```

Compose:

```kotlin
BpkTheme {
    BpkText("Hello from Compose!")
}
```

## Features

### Android View system

You can find the list of the available components, as well as the code samples and the screenshots [here](https://skyscanner.design/latest/components/text/android.html).

All design system tokens exist as public Android resources. Here's the list of the token types and the samples of its usage:

* [border radii](Backpack/src/main/res/values/backpack.radii.xml) – `@dimen/bpkBorderRadiusSm` (XML), `R.dimen.bpkBorderRadiusSm` (Java/Kotlin)
* [colours](Backpack/src/main/res/values/backpack.color.xml) – `@color/bpkSkyBlue` (XML), `R.color.bpkSkyBlue` (Java/Kotlin)
* [semantic colours](Backpack/src/main/res/values/backpack.semantic.color.xml) – `@color/bpkTextPrimary` (XML), `R.color.bpkTextPrimary` (Java/Kotlin)
* [elevations](Backpack/src/main/res/values/backpack.elevation.xml) – `@dimen/bpkElevationSm` (XML), `R.dimen.bpkElevationSm` (Java/Kotlin)
* [spacings](Backpack/src/main/res/values/backpack.dimensions.spacing.xml) – `@dimen/bpkSpacingLg` (XML), `R.dimen.bpkSpacingLg` (Java/Kotlin)
* [text styles](Backpack/src/main/res/values/backpack.text.xml) – `?bpkTextBaseSize` (XML)

### Jetpack Compose

Backpack for Compose targets **stable Compose** releases.

You can find the list of the available components, as well as the code samples and the screenshots [here](https://skyscanner.design/latest/components/text/compose.html).

The design system tokens are located in a `net.skyscanner.backpack.compose.tokens` package.
Here's the list of the token types and the samples of its usage:

* [border radii](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkBorderRadius.kt) – `BpkBorderRadius.Lg`
* [border sizes](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkBorderSize.kt) – `BpkBorderSize.Sm`
* [colours](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkColor.kt) – `BpkColor.SkyBlue`
* [semantic colours](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkColors.kt) – `BpkTheme.colors.textPrimary`
* [elevations](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkElevation.kt) – `BpkElevation.Sm`
* [spacings](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkSpacing.kt) – `BpkSpacing.Sm`
* [text styles](backpack-compose/src/main/kotlin/net/skyscanner/backpack/compose/tokens/BpkTypography.kt) – `BpkTheme.typography.heading4`

## Contributing to Backpack

Please see the [Contributing guide][0] for instructions on contributing to this project.

## License

Backpack is available under the Apache 2.0 license. See the LICENSE file for more info.

[0]: CONTRIBUTING.md


<h1> <img align="center" width="64" height="64" src="https://s3-eu-west-1.amazonaws.com/public-resources.ml-labs.aws.intellij.net/static/kinference/icon_256.png" alt="KInference Icon"> KInference </h1>

[![JB Research](https://jb.gg/badges/research-flat-square.svg)](https://research.jetbrains.org/)

KInference is a library that makes it possible to execute complex ML models (written via ONNX) in Kotlin.

[ONNX](https://github.com/onnx/onnx) is a popular ecosystem for building, training, evaluating, and exchanging ML and DL models. It makes the process much
simpler and divides the model into building blocks that can be switched or tuned to one's liking.

However, popular ML libraries, including those intended for the inference of ONNX models, carry with themselves
a lot of dependencies and requirements that complicate their use in some cases.
KInference is designed to facilitate the inference of ONNX models on a variety of platforms via configurable backends.
Our library addresses not only the problem of server side inference, but also of local inference as well, and provides
several solutions that are suitable for running both on user side and server side.

Right now, KInference is in active development.

### Table of contents:
* [Why should I use KInference?](#why-should-i-use-kinference)
* [KInference Backends](#kinference-backends)
* [Third-party math libraries adapters](#third-party-math-libraries-adapters)
* [Getting started](#getting-started)
* [Examples](#examples)

### Why should I use KInference?

* **KInference is specifically optimized for inference.**
  Most of the existing ML libraries are, in fact, versatile tools for model training and inference,
  but carry with themselves a lot of dependencies and requirements. KInference, on the other hand, addresses inference-only functionality
  to help facilitate model inference with a relatively small yet convenient API and inference-specific optimizations.

* **KInference has pure-JS and pure-JVM backends** that make it possible to run models anywhere where JS or JVM virtual machine is available.
  In addition, you can switch between the chosen backends using backend configuration.

* **KInference supports configurable backends.**
  KInference employs platform-specific optimizations and allows backend configuration essential for multiplatform projects.
  You can choose a backend for every module in the `build.gradle.kts` project file just by adding corresponding dependencies,
  while keeping most of your KInference-related code in a single common module.

* **KInference enables data preprocessing.**
  We understand that data needs preprocessing before feeding it to the model and that is why we implemented numpy-like n-dimensional arrays.
  KInference can also work with custom array formats, with some of them being available out-of-the-box
  (see [multik](https://github.com/Kotlin/multik),
  [kmath](https://github.com/SciProgCentre/kmath)).

## KInference backends

### KInference Core
Pure Kotlin implementation that requires nothing but vanilla Kotlin. KInference Core is lightweight but fast, and supports numerous ONNX operators.
It makes the library easy to use and especially convenient for various applications that require the models to run locally on users' machines.
Note that this backend is well-optimized for JVM projects only, and, despite the fact that KInference Core is available for JavaScript projects,
it is highly recommended to use KInference TensorFlow.js backend instead for more performance.

KInference Core dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "inference-core", "0.2.21")
}
```

### TensorFlow.js
High-performance JavaScript backend that relies on the [Tensorflow.js](https://www.tensorflow.org/js/) library.
Essentially, it employs GPU operations provided by TensorFlow.js to boost the computations.
In addition, this implementation enables model execution directly in the user's browser.
This backend is recommended for JavaScript projects.

TensorFlow.js backend dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "inference-tfjs", "0.2.21")
}
```

### ONNXRuntime CPU and ONNXRuntime GPU
Java backends that use [ONNXRuntime](https://github.com/microsoft/onnxruntime) as an inference engine
and provide common KInference API to interact with the ONNXRuntime library.

Note that the GPU backend is **CUDA-only**.
To check on the system requirements, visit the following [link](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements)

ONNXRuntime CPU backend dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "inference-ort", "0.2.21")
}
```

ONNXRuntime GPU backend dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "inference-ort-gpu", "0.2.21")
}
```

## Third-party math libraries adapters
KInference works with custom array formats, and some of them are available out-of-the-box.
Basically, adapters enable working with familiar array formats and libraries.
You can use several third-party Kotlin math libraries with KInference via our data adapters.
In addition to the library adapters listed below, you can implement your own adapters using KInference adapters API.

### KMath adapter
Array adapter for the [kmath](https://github.com/SciProgCentre/kmath) library that works with JVM KInference backends.

Dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "adapter-kmath-{backend_name}", "0.2.21")
}
```

### Multik adapter
Array adapter for the [multik](https://github.com/Kotlin/multik) library that works with JVM KInference backends.

Dependency coordinates:
```kotlin
dependencies {
    api("io.kinference", "adapter-multik-{backend_name}", "0.2.21")
}
```

## Getting started
Let us now walk through how to get started with KInference. The latest version of KInference is *0.2.21*

### Setup dependencies repository

Firstly, you should add KInference repository in `build.gradle.kts` via:

```kotlin
repositories {
    maven {
        url = uri("https://packages.jetbrains.team/maven/p/ki/maven")
    }

    maven {
        url = uri("https://packages.jetbrains.team/maven/p/grazi/grazie-platform-public")
    }
}
```

### Project setup
To enable the backend, you can add the chosen KInference runtime as a dependency:

```kotlin
dependencies {
    api("io.kinference", "inference-core", "0.2.21")
}
```

### Multi-backend project setup
To configure individual KInference backend for each target, you should add corresponding backends to the dependencies.

```kotlin
kotlin {
    jvm {}

    js(IR) {
        browser()
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                api("io.kinference:inference-api:0.2.21")
                api("io.kinference:ndarray-api:0.2.21")
            }
        }

        val jvmMain by getting {
            dependencies {
                api("io.kinference:inference-core:0.2.21")
            }
        }

        val jsMain by getting {
            dependencies {
                api("io.kinference:inference-tfjs:0.2.21")
            }
        }
    }
}
```

## Examples
You can find several KInference usage examples in [this repository](https://github.com/JetBrains-Research/kinference-examples).
The repository has examples of multi-backend project configuration and sharing KInference-related code between the modules.

## Want to know more?
KInference API itself is widely documented, so you can explore its code and interfaces to get to know KInference better.

You may also submit feedback and ask questions in repository issues and issue discussions.


# Flank

Flank is a [massively parallel Android and iOS test runner](https://docs.google.com/presentation/d/1goan9cXpimSJsS3L60WjljnFA_seUyaWb2e-bezm084/edit#slide=id.p1) for [Firebase Test Lab](https://firebase.google.com/docs/test-lab/).

Flank is YAML compatible with [the gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/alpha/firebase/test). Flank provides extra features to accelerate velocity and increase quality.

### Documentation is at [flank.github.io/flank](https://flank.github.io/flank/)

### Github action documentation is at [repository](https://github.com/Flank/flank/blob/master/docs/flank-github-action/store_documentation.md)


Okio
====

See the [project website][okio] for documentation and APIs.

Okio is a library that complements `java.io` and `java.nio` to make it much
easier to access, store, and process your data. It started as a component of
[OkHttp][1], the capable HTTP client included in Android. It's well-exercised
and ready to solve new problems.

License
--------

    Copyright 2013 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

 [1]: https://github.com/square/okhttp
 [okio]: https://square.github.io/okio/


# dgs-framework

![CI](https://github.com/Netflix/dgs-framework/workflows/CI/badge.svg?branch=master)
[![GitHub release](https://img.shields.io/github/v/release/Netflix/dgs-framework.svg)](https://GitHub.com/Netflix/dgs-framework/releases)
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-netflixoss-project-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)

Documentation can be found [here](https://netflix.github.io/dgs), including a getting started guide.

The DGS Framework (Domain Graph Service) is a GraphQL server framework for Spring Boot, developed by Netflix.

Features include:

* Annotation based Spring Boot programming model
* Test framework for writing query tests as unit tests
* Gradle Code Generation plugin to create types from schema
* Easy integration with GraphQL Federation
* Integration with Spring Security
* GraphQL subscriptions (WebSockets and SSE)
* File uploads
* Error handling
* Many extension points

# Getting Started

Follow the [getting started guide](https://netflix.github.io/dgs/getting-started/)!

# Contributing, asking questions and reporting issues.

Please read our [contributor guide](CONTRIBUTING.md)!


# Purescript plugin for the IntelliJ Platform

[![Build Status](https://github.com/intellij-purescript/intellij-purescript/workflows/Gradle%20Check/badge.svg)](https://github.com/intellij-purescript/intellij-purescript/actions)
[![Publish Status](https://github.com/intellij-purescript/intellij-purescript/workflows/Publish/badge.svg)](https://github.com/intellij-purescript/intellij-purescript/actions)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

## Introduction video

[![Introduction video](https://img.youtube.com/vi/vgpoF0XV2UM/0.jpg)](https://www.youtube.com/watch?v=vgpoF0XV2UM)

## Community

Visit discord http://purescript.org/chat and join the editors channel to ask for
help or to pair on issues and improve the plugin together,

### Dev

1. clone the repo
2. `./gradlew :runIde`
    > starts a Intellij instance with the plugin installed-


![Build Status](https://forcedotcom.github.io/SalesforceMobileSDK-TestResults/Templates-results/dev/latest/buildstatus.svg)

# SalesforceMobileSDK-Templates

Use the forceios/forcedroid/forcehybrid/forcereact or sfdx with sfdx-mobilesdk-plugin to create a new application based on one of the template.


# README #

[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=dhis2_dhis2-android-capture-app&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=dhis2_dhis2-android-capture-app)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dhis2_dhis2-android-capture-app&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=dhis2_dhis2-android-capture-app)

Check the [Wiki](https://github.com/dhis2/dhis2-android-capture-app/wiki) for information about how to build the project and its architecture **(WIP)**

### What is this repository for? ###

DHIS2 Android application.


Reposilite

  Lightweight and easy-to-use repository manager for Maven based artifacts in JVM ecosystem.
This is simple, extensible and scalable self-hosted solution to replace managers like Nexus, Archiva or Artifactory, with reduced resources consumption.

  Website
  |
  Official Guide
  |
  GitHub Releases
  |
  DockerHub Images
  |
  Support
  |
  Demo

### Installation

To run Reposilite for your personal needs you should assign around 20MB of RAM and at least Java 11+ installed.

For huge public repositories you can adjust memory limit and even size of used thread pools in the configuration.

```bash
# Launching a standalone JAR file
$ java -Xmx32M -jar reposilite-3.5.14.jar

# Using the official Docker image
$ docker pull dzikoysk/reposilite:3.5.14

# Using the official Helm chart
$ helm repo add reposilite https://helm.reposilite.com/
$ helm repo update
$ helm install reposilite/reposilite
```

Visit official guide to read more about extra parameters and configuration details.

### Publications

Reposilite 3.x:
* [Reposilite 3.x / Official Guide](https://reposilite.com/guide/about)
* [Reddit / 3.x Thread](https://www.reddit.com/r/java/comments/xy07vc/reposilite_3x_released_alternative_lightweight/)
* [Medium / Setup your own Maven repository manager in 5 minutes](https://dzikoysk.medium.com/reposilite-3-x-setup-your-own-maven-repository-manager-in-5-minutes-e72cc8b67bc3)

Reposilite 2.x:
* [Reposilite 2.x / Official Guide](https://v2.reposilite.com/)
* [Reddit / 2.x Thread](https://www.reddit.com/r/java/comments/k8i2m0/reposilite_alternative_lightweight_maven/)
* [Dev.to / Publishing your artifacts to the Reposilite - a new self-hosted repository manager ](https://dev.to/dzikoysk/publishing-your-artifacts-to-the-reposilite-a-new-self-hosted-repository-manager-3n0h)
* [Medium / Looking for simple repository manager by David Kihato](https://kihats.medium.com/custom-self-hosted-maven-repository-cbb778031f68)

### Supporters

Thanks to all contributors and people that decided to support my work financially ❤

   Active GitHub Sponsors

    milkyway0308,
    andrm,
    rdehuyss,
    amp7368,
    talismanplatform,
    joshuasing,
    insertt,
    GotoFinal,
    mcebular,
    Koressi,
    tipsy,
    Kamilkime,
    that-apex,
    SirEndii,
    crejk,
    Rollczi,
    Jan Bojarczuk

  All time

   milkyway0308,
   rdehuyss,
   andrm,
   zzmgck,
   amp7368,
   insertt,
   joshuasing,
   talismanplatform,
   Koressi,
   GotoFinal,
   tipsy,
   mcebular,
   maxant,
   alexwhb,
   Douglas Lawrie,
   SirEndii,
   that-apex,
   Kamilkime,
   FlawCra,
   crejk,
   Rollczi,
   Zur13,
   mattwelke,
   Andreas R.,
   TheFruxz,
   oskarscot,
   Szczurowsky,
   zugazagoitia,
   EthanDevelops,
   bmstefanski,
   neg4n,
   escv,
   scheidtp,
   Lukas P.,
   arthurr0,
   shitzuu,
   peter-jerry-ye,
   Rob,
   sebba-dev,
   mufinlive,
   bopke,
   asikkema,
   Jan Bojarczuk

`\(^-^)/` The list is updated periodically and entries are sorted by aggregated total payment size of the given person.

### For developers

Recommended tool to develop backend module is IntelliJ IDE, for frontend it might be e.g. VSC.

```bash
# Run only backend through CLI
$ ./gradlew run

# Run only frontend
$ cd reposilite-frontend && npm i && npm run full

# Run only Reposilite site
$ cd reposilite-site/website && npm i && npm run start
```

#### Stack

[Reposilite 3.x](https://reposilite.com/)
* Reposilite Backend: [Kotlin](https://kotlinlang.org/) + [Javalin](https://javalin.io) + [Exposed (SQL)](https://github.com/JetBrains/Exposed) + [AWS SDK](https://github.com/aws/aws-sdk-java) + [JUnit](https://junit.org/junit5/) + [Testcontainers](https://www.testcontainers.org/) + _(DDD & Hexagonal Architecture)_
* Reposilite Frontend: [Vue3](https://vuejs.org/) + [Vite](https://vitejs.dev/) + [WindiCSS](https://windicss.org/) + [JsonForms](https://jsonforms.io/)
* Reposilite Site: [Next.js](https://nextjs.org/) + [Vercel](https://vercel.com/)

[Reposilite 2.x](https://v2.reposilite.com/)
* Reposilite Backend: Java + [Javalin](https://javalin.io/) + [Groovy](https://groovy-lang.org/) ([JUnit](https://junit.org/junit5/)) + _(DDD)_
* Reposilite Frontend: [Vue2](https://v2.vuejs.org/) + [Pug](https://pugjs.org/api/getting-started.html) + [Stylus](https://stylus-lang.com/) + [TailwindCSS](https://tailwindcss.com/)
* Reposilite Site: [React.js](https://reactjs.org/) + [Docusaurus v1](https://docusaurus.io/)

Reposilite 1.x
* Reposilite: Java + [NanoHTTPD](https://github.com/NanoHttpd/nanohttpd)


Muzei Live Wallpaper
====================

*A living museum for your Android home screen.*

Muzei is a live wallpaper that gently refreshes your home screen each day with famous works of art. It also recedes into the background, blurring and dimming artwork to keep your icons and widgets in the spotlight. Simply double touch the wallpaper or open the Muzei app to enjoy and explore the artwork in its full glory.

Alternatively, you can choose your favorite photos from your own gallery or other apps to use on your home screen. To keep your wallpaper fresh, Muzei will rotate through your favorite photos every few hours.

Muzei API
=========

Muzei offers a simple API that allows you to build your own wallpaper source.

**[Read the API docs](http://api.muzei.co)**  •  **[Check out the Unsplash example source](https://github.com/muzei/muzei/tree/main/example-unsplash)**


![fritz2](https://www.fritz2.dev/img/fritz2_header.png)

[![Actions Status](https://github.com/jwstegemann/fritz2/workflows/build/badge.svg)](https://github.com/jwstegemann/fritz2/actions)
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
[![Download](https://img.shields.io/maven-central/v/dev.fritz2/core)](https://search.maven.org/search?q=g:dev.fritz2)
[![IR](https://img.shields.io/badge/Kotlin%2FJS-IR%20supported-yellow)](https://kotl.in/jsirsupported)
[![Examples](https://img.shields.io/badge/examples-showcase-yellow)](/examples)
[![API](https://img.shields.io/badge/API-dokka-green)](https://fritz2.dev/api)
[![Docs](https://img.shields.io/badge/docs-online-violet)](https://fritz2.dev/docs)
[![Slack chat](https://img.shields.io/badge/kotlinlang-%23fritz2-B37700?logo=slack)](https://kotlinlang.slack.com/messages/fritz2)

fritz2 is an ***extremely lightweight***, well-performing, independent library for building
reactive web apps in ***Kotlin***, heavily depending on coroutines and flows.

fritz2 includes an intuitive way to build and render HTML elements using a type-safe dsl.
You can easily create lightweight **reactive** HTML components which are bound to an underlying model
and **automatically** change whenever the model data changes:

```kotlin
render {
    val model = storeOf("init value")

    div("some-css-class") {
        input {
            value(model.data)
            changes.values() handledBy model.update
        }
        p {
            +"model value = "
            model.data.renderText()
        }
    }
}
```

fritz2 implements **precise data binding**. This means that when parts of your data model change,
**exactly those** and only those DOM-nodes depending on the changed parts will automatically change as well.
No intermediate layer (like a virtual DOM) is needed. fritz2 requires no additional methods to decide
which parts of your component have to be re-rendered.
fritz2 also supports **two-way data binding** out-of-the-box to update your model by listening on events:

[//]: # (![State management in fritz2](https://fritz2.dev/img/fritz2_cycle_of_life.png))
![State management in fritz2](https://raw.githubusercontent.com/jwstegemann/fritz2/gh-pages/img/fritz2_cycle_of_life.png)

Utilizing Kotlin's multiplatform-abilities, you'll write the code of your data classes only once and use
it on your client and server (i.e. in a [SpringBoot](https://github.com/jamowei/fritz2-spring-todomvc)- or
[Ktor](https://github.com/jamowei/fritz2-ktor-todomvc)-Backend).
This is also true for your model-validation-code, which can quickly become far more complex than your data model.

## Key Features

- easy reactive one- and two-way data binding (even for lists and deep nested structures)
- hassle-free state-handling
- model-validation and message handling
- http and websockets
- hash-based routing
- history / undo
- processing state ("spinning wheel")
- webcomponents
- easy to learn
- [documentation](https://fritz2.dev/docs)
- [examples](/examples) i.e. implementing the specification of [TodoMVC](http://todomvc.com/)

## How to try it?

* Take a look at our hosted [examples](https://www.fritz2.dev/examples/)
* Or set up a new project on your own, following our [documentation](https://www.fritz2.dev/docs/start/)

## Overall Goals

- staying lightweight
- keeping dependencies as low as possible
- providing tags, attributes, events for HTML from specification (w3c, mozilla, ...)
- making it as easy as possible to write reactive web-apps in pure kotlin

## Inspiration

fritz2 is hugely inspired by the great [Binding.scala](https://github.com/ThoughtWorksInc/Binding.scala) framework.
Later we discovered that a lot of those concepts are described independently in [Meiosis](https://meiosis.js.org/).
Also, fritz2 relies heavily on the great Kotlin [coroutines](https://github.com/Kotlin/kotlinx.coroutines) library.

## Leave us a star...

If you like the idea of a lightweight pure Kotlin implementation for building reactive web-apps,
please give us a star. Thank you!


# Fate/Grand Automata

[![CI](https://github.com/Fate-Grand-Automata/FGA/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/Fate-Grand-Automata/FGA/actions)

[![Discord Banner 2](https://discordapp.com/api/guilds/1117873862500163684/widget.png?style=banner2)](https://discord.gg/H99eUMYuH7)

Auto-battle app for FGO (Android 7 or later, no need for root on phones).

Download from our [website](https://fate-grand-automata.github.io)

This is a **Kotlin** port of [FGO-Lua][FGOLua] as an Android app with UI for configuration and without a time-limit on use.
It doesn't tamper with the game in anyway and works by looking at the screen and tapping things just like a normal user would do.
It's not made to do the story for you, but to automate the mundane farming.

Having Trouble? See the [Troubleshooting Guide](https://github.com/Fate-Grand-Automata/FGA/wiki/Troubleshooting) first.

## Video Guide by @reconman

[![Watch the video guide](https://img.youtube.com/vi/JOwupZ4W8AQ/sddefault.jpg)](https://youtu.be/JOwupZ4W8AQ)

## How to Use?

1. Install from the link given above and launch the app.
2. Click on `Start Service` and give all the permissions it asks for.
3. Open FGO. Now, you can see a button with play icon on it floating on screen.
4. Go to the node you want to farm.
5. Press Play to start. The same button can be pressed to pause/stop later.

Check the [Troubleshooting Guide](https://github.com/Fate-Grand-Automata/FGA/wiki/Troubleshooting) first if you face any problems.

## How to make/use images of Servant/CE/Friend?

See the wiki page for [Support Image Maker](https://github.com/Fate-Grand-Automata/FGA/wiki/Support-Image-Maker).

## What about other scripts like Lottery and Friend Gacha?

When you click on the PLAY button, the app detects which script can be run on the current screen and presents it to you.

## How does it work?

This is a native Android app written in Kotlin.
We use [OpenCV](https://opencv.org/) for image recognition,
[Media Projection](https://developer.android.com/reference/android/media/projection/MediaProjection) for taking screenshots
and [Accessibility Service](https://developer.android.com/guide/topics/ui/accessibility) for clicking/swiping.

## Contributing

If you want to contribute, read the [Contribution Guide](CONTRIBUTING.md).

## Acknowledgements

- [FGO-Lua][FGOLua] developers are the real deal. Without them this app won't exist.
- We're using OpenCV Android package from: https://github.com/iamareebjamal/opencv-android
- The icons are from https://materialdesignicons.com/
- Drag-sort logic on Card Priority screen is thanks to https://medium.com/@ipaulpro/drag-and-swipe-with-recyclerview-6a6f0c422efd

[FGOLua]: https://github.com/29988122/Fate-Grand-Order_Lua

## Like the project? Want to support us?

Code/doc contributions are surely welcome!

Translations should be edited via https://poeditor.com/join/project/67PXOyBGI0


![Build Status](https://github.com/rive-app/rive-android/actions/workflows/release.yml/badge.svg)
![Test Status](https://github.com/rive-app/rive-android/actions/workflows/tests.yml/badge.svg)
![Discord badge](https://img.shields.io/discord/532365473602600965)
![Twitter handle](https://img.shields.io/twitter/follow/rive_app.svg?style=social&label=Follow)

# Rive Android

![Rive hero image](https://cdn.rive.app/rive_logo_dark_bg.png)

An Android runtime library for [Rive](https://rive.app).

The library is distributed through
the [Maven](https://search.maven.org/artifact/app.rive/rive-android) repository.

## Table of contents

- ⭐ [Rive Overview](#rive-overview)
- 🚀 [Getting Started & API docs](#getting-started)
- 🔍 [Supported Versions](#supported-versions)
- 🧪 [Experimental Features](#experimental-features)
- 📚 [Examples](#examples)
- 👨💻 [Contributing](#contributing)
- ❓ [Issues](#issues)

## Rive overview

[Rive](https://rive.app) is a real-time interactive design and animation tool that helps teams
create and run interactive animations anywhere. Designers and developers use our collaborative
editor to create motion graphics that respond to different states and user inputs. Our lightweight
open-source runtime libraries allow them to load their animations into apps, games, and websites.

🏡 [Homepage](https://rive.app/)

📘 [General help docs](https://help.rive.app/)

🛠 [Learning Rive](https://rive.app/learn-rive/)

## Getting started

Follow along with the link below for a quick start in getting Rive Android integrated into your
multi-platform applications.

[Getting Started with Rive in Android](https://help.rive.app/runtimes/overview/android)

## Supported versions

Currently, this runtime library supports a minimum SDK version of **21**, and the target SDK version
is **33**.

## Examples

Check out the `app/` folder to see an example application using the Rive Android runtime.

To run the example app set the `app` build variant to `preview`. In Android Studio, to select which build variant to build and run, go to **Build > Select Build Variant** and select a build variant from the menu.

The `preview` build variant makes use of the hosted Rive dependency. If you're looking to contribute, set the build variant to `debug` and see `CONTRIBUTING.md` for more information. Building this variant will require additional configuration and setup.

The example showcases a number of ways to manipulate Rives, including:

- How to include Rive files into the project and reference them
- Setting layout and loop mode options
- Displaying single or multiple animations / artboards on one component
- Setting up and manipulating a state machine via inputs
- Handling events
- Utilizing a low-level API to build a render loop for more control over scenes
- ...and more!

### Awesome Rive

For even more examples and resources on using Rive at runtime or in other tools, checkout the [awesome-rive](https://github.com/rive-app/awesome-rive) repo.

## Experimental features

The Rive renderer is available _experimentally_ in `7.0.0`.

Read more about the Rive Renderer [here](https://rive.app/renderer). Additional information on [choosing a renderer](https://help.rive.app/runtimes/renderer) for Rive's runtimes.

You may encounter incompatibilities with specific devices - for example, the new renderer won't work on emulators just yet but only on physical devices.

Your feedback is greatly appreciated during this stage and we'd love to hear from you!

To use the new Rive renderer you can specify the parameter in XML:

```xml
<app.rive.runtime.kotlin.RiveAnimationView
  app:riveRenderer="Rive"
  … />
```

Alternatively, specify the renderer when initializing Rive:

```kotlin
Rive.init(applicationContext, defaultRenderer = RendererType.Rive)
```

This default value can still be overriden via XML.

## Contributing

We love contributions! Check out our [contributing docs](./CONTRIBUTING.md) to get more details into
how to run this project, the examples, and more all locally.

## Issues

Have an issue with using the runtime, or want to suggest a feature/API to help make your development
life better? Log an issue in our [issues](https://github.com/rive-app/rive-android/issues) tab! You
can also browse older issues and discussion threads there to see solutions that may have worked for
common problems.

### Known issues

After `rive-android:6.0.0`, CMake is building the library, and you might run into the following error when `rive-android` is used alongside other native libraries:

```shell
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
…
```

You can fix this by adding this in your `build.gradle`:

```gradle
android {
  …
  packagingOptions {
      pickFirst "lib/x86/libc++_shared.so"
      pickFirst "lib/x86_64/libc++_shared.so"
      pickFirst "lib/armeabi-v7a/libc++_shared.so"
      pickFirst "lib/arm64-v8a/libc++_shared.so"
  }
  …
}
```

### Breaking changes

#### **9.0.0**

- State Machine Inputs aren't processed on the UI thread anymore, but they are queued and processed
  by the worker thread on the `advance()` following `RiveAnimationView.[fireState()/setNumberState()/setBooleanState()]`
- `RiveArtboardRenderer`
  - Constructor is simplified and now takes fewer parameters
  - Deprecated APIs from `RiveArtboardRenderer` are now accessible via `RiveAnimationView` or `RiveAnimationView.controller`
- `RiveFileController.hasPlayingAnimations` is now `isAdvancing`


> A high-performance data store for geospatial files

[![Apache License, Version 2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Actions Status](https://github.com/georocket/georocket/workflows/Java%20CI/badge.svg)](https://github.com/georocket/georocket/actions)

GeoRocket can store geospatial files such as *3D city models (CityGML)*, *GML*
and *GeoJSON* files. Any file saved in GeoRocket can be completely restored
later. No information is lost.

GeoRocket offers a wide range of *high-speed search features*. You can perform
spatial queries and search for attributes, layers and tags.

GeoRocket is *ready for the Cloud*. It is event-driven and designed for
*high performance* and *scalability*. GeoRocket offers APIs and an HTTP
interface which allows it to be integrated in existing applications.

## Official website

For more information about GeoRocket including comprehensive documentation,
visit the official website:

🚀 https://georocket.io

## Building

> [!NOTE]
> We are in the process of rewriting GeoRocket in Rust to improve performance and reduce memory footprint. You can still access the Kotlin implementation in the `kotlin` directory. The instructions below apply to the Kotlin implementation.

GeoRocket requires Java 8 or higher. Run the following command to build
all subprojects:

    cd kotlin
    ./gradlew build

The script automatically downloads the correct Gradle version, so you won't
have to do anything else. If everything runs successfully you may create a
distribution:

    ./gradlew installDist

If the command finishes successfully, you will find the distribution under
`build/install`.

### Building the Docker image

You may build the Docker image for GeoRocket Server locally with the following
commands:

    ./gradlew installDist
    docker build -t georocket .

## Running GeoRocket

First, follow the instructions on building the GeoRocket distribution above.

Then start GeoRocket with the following command:

    build/install/georocket/bin/georocket

You may also run it in server mode (recommended for production use):

    build/install/georocket/bin/georocket server

If you don't provide any arguments the command-line application will print
usage instructions.

### Running GeoRocket Server inside a Docker container

The fastest way to run GeoRocket Server is to use the Docker image from
Docker Hub:

    docker run --name georocket -d -p 63020:63020 georocket/georocket server

This launches GeoRocket Server in a Docker container and makes it available at
<http://localhost:63020>.

Read the [full instructions](https://hub.docker.com/r/georocket/georocket/) on
the Docker image to get more information.

License
-------

GeoRocket is licensed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


![Arcs](docs/logo.png)

[![Cloud Build Status](https://storage.googleapis.com/arcs-github-gcb-badges/builds/arcs/branches/master.svg)](https://console.cloud.google.com/cloud-build/builds?query=trigger_id%3D%22bdf768b5-8901-43e5-814c-f3adffff2eab%22&project=arcs-265404)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/rswlpkq2vtp9cns0/branch/master?svg=true)](https://ci.appveyor.com/project/arcs/arcs-3i77k/branch/master)
[![arcs-live](https://github.com/PolymerLabs/arcs/workflows/arcs-live/badge.svg)](https://github.com/PolymerLabs/arcs/actions?query=workflow%3Aarcs-live)

_Our mission is to create an open platform for smart and ubiquitous computing, where users have sovereignty over their data and its use._

A hosted version of Arcs is available at https://live.arcs.dev.

[TypeDoc](https://live.arcs.dev/dist/apidocs/) generated documentation is available for Arcs Runtime.

To develop with Arcs, please follow  our [Contributing Guide](CONTRIBUTING.md)
and [tutorials](particles/Tutorial/README.md).

Questions? Please join our [Mailing list](mailto:arcs-discuss@googlegroups.com).

## Subprojects

Subcomponents have more detailed descriptions. Particularly the extensions
also have individual installation steps.

### Chrome Extension

See [extension](extension/README.md).

### Android Developer Tools

See [DevToolsNG](devtoolsNG/README.md).

### Chrome Developer Tools Extension

See [devtools](devtools/README.md).


# Turbo Native for Android

**Build high-fidelity hybrid apps with native navigation and a single shared web view**. Turbo Native for Android provides the tooling to wrap your [Turbo 7](https://turbo.hotwired.dev/)-enabled web app in a native Android shell. It manages a single WebView instance across multiple Fragment destinations, giving you native navigation UI with all the client-side performance benefits of Turbo.

## Features
- **Deliver fast, efficient hybrid apps.** Avoid reloading JavaScript and CSS. Save memory by sharing one WebView.
- **Reuse mobile web views across platforms.** Create your views once, on the server, in HTML. Deploy them to [iOS](https://github.com/hotwired/turbo-ios), Android, and mobile browsers simultaneously. Ship new features without waiting on Play Store approval.
- **Enhance web views with native UI.** Navigate web views using native patterns. Augment web UI with native controls.
- **Produce large apps with small teams.** Achieve baseline HTML coverage for free. Upgrade to native views as needed.

## Requirements

1. Android SDK 26+ is required as the `minSdk` in your `build.gradle.kts` file.
1. This library is written entirely in [Kotlin](https://kotlinlang.org/), and your app should use Kotlin as well. Compatibility with Java is not provided or supported.
1. This library supports web apps using either Turbo 7 or Turbolinks 5.
1. `Turbo` (or `Turbolinks`) is exposed on the `window` object on the WebView page being loaded.

**Note:** You should understand how Turbo works with web applications in the browser before attempting to use Turbo Android. See the [Turbo 7 documentation](https://turbo.hotwired.dev) for details.

## Getting Started
The best way to get started with Turbo Android is to try out the demo app first to get familiar with the framework. The demo app walks you through all the basic Turbo flows as well as some advanced features. To run the demo, clone this repo, open the directory in Android Studio, and build the `demo` module to your Android device. See [demo/README.md](demo/README.md) for more details about the demo. When you’re ready to start your own application, read through the rest of the documentation.

See the [instructions to build the project yourself](docs/BUILD-PROJECT.md).

## Documentation

1. [Installation](docs/INSTALLATION.md)
1. [Overview](docs/OVERVIEW.md)
1. [Quick Start](docs/QUICK-START.md)
1. [Path Configuration](docs/PATH-CONFIGURATION.md)
1. [Navigation](docs/NAVIGATION.md)
1. [Advanced Options](docs/ADVANCED-OPTIONS.md)

## Contributing

Turbo Android is open-source software, freely distributable under the terms of an [MIT-style license](LICENSE). The [source code is hosted on GitHub](https://github.com/hotwired/turbo-android). Development is sponsored by [37signals](https://37signals.com/).

We welcome contributions in the form of bug reports, pull requests, or thoughtful discussions in the [GitHub issue tracker](https://github.com/hotwired/turbo-android/issues).

Please note that this project is released with a [Contributor Code of Conduct](docs/CONDUCT.md). By participating in this project you agree to abide by its terms.

---------

© 2024 37signals LLC


[![Build](https://github.com/navikt/token-support/workflows/Build%20master/badge.svg)](https://github.com/navikt/token-support/actions)
[![Known Vulnerabilities](https://snyk.io/test/github/navikt/token-support/badge.svg)](https://snyk.io/test/github/navikt/token-support)
[![Maven Central](https://img.shields.io/maven-central/v/no.nav.security/token-support?color=green&logo=Apache%20Maven)](https://search.maven.org/artifact/no.nav.security/token-support)

# token-support
This project provides several standalone modules supporting common security token handling in Java and Kotlin applications, e.g. either as an OAuth 2.0 client or a OAuth 2.0 Resource Server with JWT validation.

The main motivation behind the project is to support **multiple** token issuers/identity providers with as much ease as possible.

The modules are roughly split in two:

* **token-client-*** (support for multiple OAuth 2.0 grants/flows as a client)
* **token-validation-*** (support for JWT token validation following best practice and OAuth 2.0 specifications)

The client and validation modules provide a core module and specific "wrapper" implementations for some well known libraries such as Spring Boot, JAX-RS and KTOR.

## Main components

This project is mainly composed of modules wrapping other well known libraries. Currently there is support for:
* Spring Boot and Spring Web MVC
* JAX-RS
* Plain Java
* Kotlin with ktor

### token-validation-core

Provides the core token validation support, using the [Nimbus OAuth 2.0 SDK with OpenID Connect extensions](https://connect2id.com/products/nimbus-oauth-openid-connect-sdk). Token signing keys are retrieved from the external issuer and cached in the **`JwtTokenValidator`**, using the  **`com.nimbusds.openid.connect.sdk.validators.IDTokenValidator`** (this validator also works well for validating access_tokens). Token signing keys will be fetched from the jwt_keys endpoint configured in the provider configuration metadata endpoint (e.g. **`/.well-known/openid-configuration`**) when required (e.g. new signing keys are detected).

This module can be used standalone (e.g. if you do not use Spring or JAX-RS). You will however need to code the part to "hook in" enforcement and trigger the token validation (e.g. as done in the token-validation-filter module). If you use Spring, JAX-RS or Ktor you should use the specific module for your framework.

### token-validation-filter

Simple servlet filter using the token-validation-core components for validating tokens on inbound HTTP requests. Can be used standalone but is more commonly used together with Spring or JAX-RS.

### token-validation-spring

Spring Boot (Spring Web) specific wrapper around token-validation-core and token-validation-filter providing auto configuration of the relevant components.
To enable token validation for a spring boot application, simply annotate your SpringApplication class or any Spring Configuration class with **`@EnableJwtTokenValidation`**. Optionally list the packages or classses you dont want token validations for (e.g. error controllers). The package **`org.springframework`** - e.g. **`@EnableJwtTokenValidation(ignore="org.springframework")`** is listed as ignored by default if you dont specify a ignore list. Use the **`@Unprotected`** or **`@Protected`**/**`@ProtectedWithClaims`** annotations at rest controller method/class level to indicate if token validation is required or not.

There is a short sample below, however more detailed samples are available in the **`token-validation-spring-demo`** module.

#### SpringApplication sample

This annotation will enable token validation and token transportation/propagation through the service

```java

@SpringBootApplication
@EnableJwtTokenValidation
public class ProductServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(ProductServiceApplication.class, args);
	}
}

```

#### Rest controller sample

This example shows

- First method - An unprotected endpoint. No token is required to use this endpoint.
- Second method - A protected endpoint. This endpoint will require a valid token from the "employee" issuer.
- Third method - A protected endpoint. This endpoint will require a valid token from one of the configured issuers.
- Fourth method - A non-annotated endpoint. This endpoint will not be accessible from outside the server (will return a 501 NOT_IMPLEMENTED).

```java
@RestController
class ProductController {

	private final ProductService productService;

  ProductController(ProductService productService){
    this.productService = productService;
  }

	@Unprotected
	@RequestMapping(value = "/product/{id}", method = RequestMethod.GET)
	public Product read(@PathVariable("id") String id) {
		return productService.read(id);
	}

	@Protected(issuer="employee")
	@RequestMapping(value = "/product", method = RequestMethod.POST)
	public Product create(@RequestBody Product product) {
		return productService.create(product);
	}

	@Protected
	@RequestMapping(value = "/product/sample", method = RequestMethod.GET)
	public Product sample() {
		Product product = Product.sample();
		product.setId(UUID.randomUUID().toString());
		return product;
	}

	@RequestMapping(value = "/product/{id}/variant", method = RequestMethod.GET)
	public Variant readVariant(@PathVariable("id") String id) {
		return productService.readVariant(id);
	}

}
```

### token-validation-jaxrs

JAX-RS wrapper around token-validation-core and token-validation-filter. Two steps are necessary to enable token validation:
* Register the servlet filter **`JaxrsJwtTokenValidationFilter`** with your servlet container to pick up the token of incoming requests
* Register the **`JwtTokenContainerRequestFilter`** with your **`Application`** (plain JAX-RS) or **`ResourceConfig`** (Jersey)

Use the **`@Unprotected`**, **`@Protected`** or **`@ProtectedWithClaims`** annotations on resource methods and/or classes indicate if token validation is required or not. Method annotations have precedence
One additional step is required to pass the token do other services

* Register **`JwtTokenClientRequestFilter`** with your client

#### Example

Register the servlet filter with your container, as done in spring boots **`@SpringBootConfiguration`** in the snippet below. How you get hold of the configuration map of issuers is up to the implementor.

```java
    @Bean
    public FilterRegistrationBean<JwtTokenValidationFilter> jwtTokenValidationFilterBean(MultiIssuerConfiguraton config) {
        return new FilterRegistrationBean<>(new JaxrsJwtTokenValidationFilter(config));
    }

    @Bean
    public MultiIssuerConfiguraton multiIssuerConfiguration(Map<String, IssuerProperties> issuerConfiguration, ProxyAwareResourceRetriever resourceRetriever) {
        return new MultiIssuerConfiguraton(issuerConfiguration, resourceRetriever);
    }

    @Bean
    public ProxyAwareResourceRetriever proxyAwareResourceRetriever() {
        return new ProxyAwareResourceRetriever();
    }
```

How you configure the servlet filter depends on how you launch your app, e.g. if you use spring or not, and whether you use tomcat or jetty

#### Configure jersey

There are two options, explicit registering of resources
```java
new ResourceConfig()
  .register(JwtTokenContainerRequestFilter.class)
  // ...
  .register(Resource.class);
```
or let jersey scan for Resources and/or **`@Provider`**-annotated classes
```java
new ResourceConfig()
  .packages("no.nav.security.token.support.jaxrs", "x.y.z.resourcepackage");
```

#### Rest controller sample with method annotations

This example shows

- First method - An unprotected endpoint. No token is required to use this endpoint.
- Second method - A protected endpoint. This endpoint will require a valid token from one of the configured issuers.
- Third method - A protected endpoint. This endpoint will require a valid token from the "employee" or "manager" issuer.
- Fourth method - A protected endpoint. This endpoint will require a valid token from the "manager" issuer and a claim where key is "acr" and value is "Level4".
- Fifth method - A non-annotated endpoint. This endpoint will not be accessible from outside the server (will return a 501 NOT_IMPLEMENTED).
```java
@Path("/rest")
public class ProductResource {

    // ...

  @GET
  @PATH("/product/")
  @Unprotected
  public List<Product> list() {
    return service.list();
  }

  @POST
  @PATH("/product")
  @Protected
  public Product add(Product product) {
    return service.create(product);
  }

  @PUT
  @PATH("/product")
  @RequiredIssuers(value = {
          ProtectedWithClaims(issuer = "employee"),
          ProtectedWithClaims(issuer = "manager")
  })
  public Product add(Product product) {
    return service.update(product);
  }

  @DELETE
  @PATH("/product/{id}")
  @ProtectedWithClaims(issuer = "manager", claimMap = { "acr=Level4" })
  public void add(String id) {
    return service.delete(id);
  }

  @GET
  @PATH("/product/{id}")
  public void add(String id) {
    return service.get(id);
  }
}
```

The claimMap in **`@ProtectedWithClaims`** can contain entries where the expected value is an asterisk, e.g.: **`"acr=*"`**. This will require that the claim is present in the token, without regards to its value.

### token-validation-ktor

See demo application in **`token-validation-ktor-demo`** for example configurations and setups.

### token-validation-* configuration

Add the modules that you need as Maven dependencies.
* token-validation-spring:
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-validation-spring</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```
* token-validation-jaxrs:
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-validation-jaxrs</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```
* token-validation-ktor:
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-validation-ktor</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```
* token-validation-core (included as dependency in all of the above):
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-validation-core</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```

#### Required properties (yaml or properties)

- **`no.nav.security.jwt.issuer.[issuer shortname]`** - all properties relevant for a particular issuer must be listed under a short name for that issuer (not the actual issuer value from the token, but a chosen name to represent config for the actual issuer) you trust, e.g. **`citizen`** or **`employee`**
- **`no.nav.security.jwt.issuer.[issuer shortname].discoveryurl`** - The identity provider configuration/discovery endpoint (metadata)
- **`no.nav.security.jwt.issuer.[issuer shortname].accepted_audience`** - The value of the audience (aud) claim in the JWT token. For OIDC it is the client ID of the client responsible for acquiring the token, in OAuth 2.0 it should be the identifier for you api.
- **`no.nav.security.jwt.issuer.[issuer shortname].validation.optional-claims`** - A comma separated list of optional claims that will be excluded from default claims.
- **`no.nav.security.jwt.issuer.[issuer shortname].jwks-cache.lifespan`** - Cache the retrieved JWK keys to speed up subsequent look-ups. A non-negative lifespan expressed in minutes. (Default 15 min)
- **`no.nav.security.jwt.issuer.[issuer shortname].jwks-cache.refreshtime`** - A non-negative refresh time expressed in minutes. (Default 5 min)

#### "Corporate" proxy support per issuer
Each issuer can be configured to use or not use a proxy by specifying the following properties:
- **`no.nav.security.jwt.issuer.[issuer shortname].proxyurl`** - The full url of the proxy, e.g. http://proxyhost:8088

### token-client-core
Provides core OAuth 2.0 client support, supporting the following OAuth 2.0 grants:
* `jwt_bearer`
* `client_credentials`
* `token_exchange`

This module can be used standalone (e.g. if you do not use Spring or Ktor).
You will however need to code the part to "hook in" the client and trigger the token retrieval. If you use Spring you should use the specific wrapper module.

When requesting a token from an OAuth 2.0 Authorization Server the client must authenticate itself with one of the following client authentication methods:
* `private_key_jwt`
* `client_secret_post`
* `client_secret_basic`

The module will choose the client authentication method based on provided configuration in the class `ClientProperties`.

Use the interface `JwtBearerTokenResolver` to supply a JWT that should be exchanged for another, i.e. in `jwt_bearer` or `token_exchange` grants.
The `OAuth2HttpClient` interface lets you provide a HTTP client of your choosing to perform the actual POST request to the OAuth 2.0 server.

### token-client-spring
Spring Boot wrapper for the module **token-client-core**, providing auto configuration for Spring.
Simply annotate your SpringApplication class or any Spring Configuration class with `EnableOAuth2Client`.
Enable caching for the OAuth 2.0 `access_token` response with `cacheEnabled = true` and configurable `cacheEvictSkew` and `cacheMaximumSize` properties.

```java
@EnableOAuth2Client(cacheEnabled = true)
@Configuration
public class Configuration {
    // ...
}
```

Detailed samples are available in the token-client-spring-demo module.
### token-client-ktor
Not implemented as of now. See demo application in **`token-client-ktor-demo`**.

### token-client-* configuration

Add the module that you need as dependencies.
* token-client-spring:
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-client-spring</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```
* token-client-core (included as dependency of the above):
```xml
   <dependency>
        <groupId>no.nav.security</groupId>
        <artifactId>token-client-core</artifactId>
        <version>${token-support.version}</version>
    </dependency>
```

#### Required properties (yaml or properties)
- **`no.nav.security.jwt.client.registration[client shortname]`** - All properties relevant for a particular client must be listed under a `short name` for that client
- **`no.nav.security.jwt.client.registration[client shortname].token-endpoint-url`** - The identity provider /token endpoint, to retrieve a token
- **`no.nav.security.jwt.client.registration[client shortname].grant-type`** - The OAuth 2.0 grant_type to use. Accepted grant types:
    - `urn:ietf:params:oauth:grant-type:jwt-bearer`
    - `client_credentials`
    - `urn:ietf:params:oauth:grant-type:token-exchange`

#### Not required
- **`no.nav.security.jwt.client.registration[client shortname].scope`** - OAuth 2.0 scopes provide a way to limit the amount of access for access tokens

#### Required Authentication properties (yaml or properties)
- **`no.nav.security.jwt.client.registration[client shortname].authentication`** - All properties relevant for client authentication must be listed under `authentication`.
- **`no.nav.security.jwt.client.registration[client shortname].authentication.client-id`** - The client ID for your application (usually preregistered at your OAuth 2.0 authorization server.
- **`no.nav.security.jwt.client.registration[client shortname].authentication.client-auth-method`** - Standard methods for client authentication. Supported methods are:
    - `client_secret_basic`
    - `client_secret_post`
    - `private_key_jwt`

##### Any of
- **`no.nav.security.jwt.client.registration[client shortname].authentication.client-secret`** - The client secret must be kept confidential.
- **`no.nav.security.jwt.client.registration[client shortname].authentication.client-jwk`** - `client-jwk` - Used to sign the client JWT, instead of `client-secret` for authentication against a provider.

#### Token-exchange
- **`no.nav.security.jwt.client.registration[client shortname].token-exchange`** - All properties relevant for the grant token-exchange must be listed under `token-exchange`.
- **`no.nav.security.jwt.client.registration[client shortname].token-exchange.audience`** - The logical name of the target service where the client intends to use the requested security token.

## Running JUnit tests or running your app locally while using these modules

There is a separate module in **token-validation-spring-test** for Spring apps, see separate [README](token-validation-spring-test/README.md) for more information.

For apps not using Spring we recommend you use the [mock-oauth2-server](https://github.com/navikt/mock-oauth2-server) and setup your tests/properties accordingly.

## Build & Release

### Sonatype OSS & Maven Central

#### Releases

In order to release a new version go to https://github.com/navikt/token-support/releases and click edit on the draft release. Edit or approve the changelog and click publish. Github Action will trigger a new release.

First, it will appear in [Sonatype OSS releases](https://oss.sonatype.org/content/repositories/releases/no/nav/security/),
before eventually (a couple of minutes later) it is synced to [Maven Central](http://central.maven.org/maven2/no/nav/security/).

## Contact

If you have any questions, please open an issue on the Github issue tracker.

For NAV employees, you can ask questions at the Slack channel [#token-support](https://nav-it.slack.com/archives/C01381BAT62)


# MythicDrops

MythicDrops is an open source Bukkit plugin that brings an RPG-like system of drops to Minecraft. Items can
have unique names, lore, and enchantments added randomly to them through a tier system.

[![Maven Central](https://img.shields.io/maven-central/v/io.pixeloutlaw.mythicdrops/mythicdrops?style=flat-square)](https://repo1.maven.org/maven2/io/pixeloutlaw/mythicdrops/mythicdrops/)
[![javadoc](https://javadoc.io/badge2/io.pixeloutlaw.mythicdrops/mythicdrops/javadoc.svg?style=flat-square)](https://javadoc.io/doc/io.pixeloutlaw.mythicdrops/mythicdrops)

## How To Get It (Server Runners)

<https://www.spigotmc.org/resources/mythicdrops.6114/>

## How to Get It (Developers)

MythicDrops is published to Maven Central.

### Gradle

```groovy
repositories {
    mavenCentral()
}

dependencies {
    compileOnly "io.pixeloutlaw.mythicdrops:mythicdrops:x.y.z"
}
```

```kotlin
repositories {
    mavenCentral()
}

dependencies {
    compileOnly("io.pixeloutlaw.mythicdrops:mythicdrops:x.y.z")
}
```

### Maven

```xml
<dependencies>
    <!-- other dependencies... -->
    <dependency>
        <groupId>io.pixeloutlaw.mythicdrops</groupId>
        <artifactId>mythicdrops</artifactId>
        <version>x.y.z</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
```

## Sponsors


# Stellio context broker

[![FIWARE Core Context Management](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/core.svg)](https://www.fiware.org/developers/catalogue/)
[![License: Apache-2.0](https://img.shields.io/github/license/stellio-hub/stellio-context-broker.svg)](https://spdx.org/licenses/Apache-2.0.html)
![Status](https://nexus.lab.fiware.org/static/badges/statuses/full.svg)
[![NGSI-LD badge](https://img.shields.io/badge/NGSI-LD-red.svg)](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf)
[![SOF support badge](https://nexus.lab.fiware.org/repository/raw/public/badges/stackoverflow/fiware.svg)](http://stackoverflow.com/questions/tagged/fiware)

[![Quay badge](https://img.shields.io/badge/quay.io-fiware%2Fstellio--*-grey?logo=red%20hat&labelColor=EE0000)](https://quay.io/search?q=stellio-)
[![Docker badge](https://img.shields.io/badge/docker-stellio%2Fstellio--*-blue?logo=docker)](https://hub.docker.com/u/stellio)

[![Documentation badge](https://readthedocs.org/projects/stellio/badge/?version=latest)](http://stellio.readthedocs.io/en/latest/?badge=latest)
![Build](https://github.com/stellio-hub/stellio-context-broker/workflows/Build/badge.svg)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=stellio-hub_stellio-context-broker&metric=alert_status)](https://sonarcloud.io/dashboard?id=stellio-hub_stellio-context-broker)
[![CodeQL](https://github.com/stellio-hub/stellio-context-broker/actions/workflows/codeql.yml/badge.svg)](https://github.com/stellio-hub/stellio-context-broker/actions/workflows/codeql.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4527/badge)](https://bestpractices.coreinfrastructure.org/projects/4527)

Stellio is an NGSI-LD compliant context broker developed by EGM. NGSI-LD is an Open API and Datamodel specification for
context management [published by ETSI](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.08.01_60/gs_CIM009v010801p.pdf)).

Stellio is a [FIWARE](https://www.fiware.org/) Generic Enabler. Therefore, it can be integrated as part of any platform “Powered by FIWARE”.
FIWARE is a curated framework of open source platform components which can be assembled together with other third-party
platform components to accelerate the development of Smart Solutions. For more information check the FIWARE Catalogue entry for
[Core Context](https://github.com/Fiware/catalogue/tree/master/core). The roadmap of this FIWARE GE is described [here](https://github.com/stellio-hub/stellio-context-broker/projects/1).

You can find more info at the [FIWARE developers](https://developers.fiware.org/) website and the [FIWARE](https://fiware.org/) website.
The complete list of FIWARE GEs and Incubated FIWARE GEs can be found in the [FIWARE Catalogue](https://catalogue.fiware.org/).

**NGSI-LD Context Broker Feature Comparison**

The NGSI-LD Specification is regularly updated and published by ETSI. The latest specification is [version 1.8.1](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.08.01_60/gs_CIM009v010801p.pdf) which was  published in April 2024.

-  An Excel file detailing the current compatibility of the  development version of the Stellio Context Broker against the features of the 1.8.1 specification can be downloaded [here](https://docs.google.com/spreadsheets/d/e/2PACX-1vRxOjsDf3lqhwuypJ---pZN2OlqFRl0jyoTV0ewQ1WFnpe7xQary3uxRjunbgJkwQ/pub?output=xlsx)

| :books: [Documentation](https://stellio.rtfd.io/) | :whale: [Docker Hub](https://hub.docker.com/orgs/stellio/repositories) | :dart: [Roadmap](./docs/roadmap.md) |
|---------------------------------------------------|------------------------------------------------------------------------|-------------------------------------|

## Overview

Stellio is composed of 2 business services:
* Search service is in charge of managing the information context and handling the temporal (and geospatial) queries, it is backed by a [TimescaleDB](https://www.timescale.com/) database
* Subscription service is in charge of managing subscriptions and subsequent notifications, it is backed by a [TimescaleDB](https://www.timescale.com/) database

It is completed with:
* An API Gateway module that dispatches requests to downstream services
* A [Kafka](https://kafka.apache.org/) streaming engine that decouples communication inside the broker (and allows plugging other services seamlessly)

The services are based on the [Spring Boot](https://spring.io/projects/spring-boot) framework, developed in [Kotlin](https://kotlinlang.org),
and built with [Gradle](https://gradle.org).

## Quick start

A quick way to start using Stellio is to use the provided `docker-compose.yml` file in the root directory (feel free to change
the default passwords defined in the `.env` file):

```shell script
docker-compose up -d && docker-compose logs -f
```

It will start all the services composing the Stellio context broker platform and expose them on the following ports:
* API Gateway: 8080
* Search service: 8083
* Subscription service: 8084

Please note that the environment and scripts are validated on Ubuntu and macOS. Some errors may occur on other platforms.

We also provide a configuration to deploy Stellio in a k8s cluster. For more information, please look in the [stellio-k8s project](https://github.com/stellio-hub/stellio-k8s)

#### TROUBLESHOOTING

If Kafka container crash when starting, you may need to change "config/kafka/update_run.sh" line separator from CRLF to
LF
## Docker images tagging

Starting from version 2.0.0, a new scheme is used for tagging of Docker images:
* Releases are tagged with the version number, e.g., `stellio/stellio-search-service:2.0.0`
* `latest` tag is no longer used for releases as it can be dangerous (for instance, triggering an unwanted major upgrade)
* On each commit on the `develop` branch, an image with the `latest-dev` tag is produced, e.g., `stellio/stellio-search-service:latest-dev`

The version number is obtained during the build process by using the `version` information in the `build.gradle.kts` file.

## Development

### Developing on a service

Requirements:
* Java 21 (we recommend using [sdkman!](https://sdkman.io/) to install and manage versions of the JDK)

To develop on a specific service, you can use the provided `docker-compose.yml` file inside each service's directory, for instance:

```shell script
cd search-service
docker-compose up -d && docker-compose logs -f
```

Then, from the root directory, launch the service:

```shell script
./gradlew search-service:bootRun
```

### Running the tests

Each service has a suite of unit and integration tests. You can run them without manually launching any external component, thanks
to Spring Boot embedded test support and to the great [TestContainers](https://www.testcontainers.org/) library.

For instance, you can launch the test suite for entity service with the following command:

```shell script
./gradlew search-service:test
```

### Building the project

To build all the services, you can just launch:

```shell script
./gradlew build
```

It will compile the source code, check the code quality (thanks to [detekt](https://detekt.dev/)) and run the test
suite for all the services.

For each service, a self executable jar is produced in the `build/libs` directory of the service.

If you want to build only one of the services, you can launch:

```shell script
./gradlew search-service:build
```

### Committing

Commits follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).

### Code quality

Code formatting and standard code quality checks are performed by [Detekt](https://detekt.github.io/detekt/index.html).

Detekt checks are automatically performed as part of the build and fail the build if any error is encountered.

* You may consider using a plugin like [Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions)
that applies changed code refactoring and optimized imports on a save.

* You can enable Detekt support with the [Detekt plugin](https://github.com/detekt/detekt-intellij-plugin).

### Working locally with Docker images

To work locally with a Docker image of a service without publishing it to Docker Hub, you can follow the below instructions:

* Build a tar image:

```shell script
./gradlew search-service:jibBuildTar
```

* Load the tar image into Docker:

```shell script
docker load --input search-service/build/jib-image.tar
```

* Run the image:

```shell script
docker run stellio/stellio-search-service:latest
```

## Releasing a new version

* Merge develop into master

```
git checkout master
git merge develop
```

* Update version number in `build.gradle.kts` (`allprojects.version` near the bottom of the file) and in `.env` (`STELLIO_DOCKER_TAG` environment variable)
* Commit the modification using the following template message

```
git commit -am "chore: upgrade version to x.y.z"
```

* Push the modifications

```
git push origin master
```

The CI will then create and publish Docker images tagged with the published version number in https://hub.docker.com/u/stellio.

* On GitHub, check and publish the release notes in https://github.com/stellio-hub/stellio-context-broker/releases

## Usage

To start using Stellio, you can follow the [API quick start](https://github.com/stellio-hub/stellio-docs/blob/master/docs/quick_start_guide.md).

## Minimal hardware requirements needed to run Stellio

The recommended system requirements may vary depending on factors such as the scale of deployment, usage patterns, and specific use cases. That said, here are the general guidelines for the minimum computer requirements:

* Processor: Dual-core processor or higher
* RAM: 4GB or higher (1.8GB is needed to just run it)
* Storage: At least 4GB of free disk space (3.8GB is needed to just run it)
* Operating System: Linux (recommended), macOS (also recommended), or Windows

Please note that these requirements may vary based on factors such as the size of your dataset, the number of concurrent users, and the overall complexity of your use case.

## Further resources

For more detailed explanations on NGSI-LD or FIWARE:

-  [NGSI-LD v1.8.1 Specification](https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.08.01_60/gs_CIM009v010801p.pdf)
-  [NGSI-LD Primer](https://www.etsi.org/deliver/etsi_gr/CIM/001_099/008/01.01.01_60/gr_CIM008v010101p.pdf)
-  [NGSI-LD Tutorials](https://ngsi-ld-tutorials.readthedocs.io/en/latest/)
-  [FIWARE Training](https://fiware-academy.readthedocs.io/en/latest/integrated-courses/fiware-training/index.html)

## License

Stellio is licensed under [APL-2.0](https://spdx.org/licenses/Apache-2.0.html).

It mainly makes use of the following libraries and frameworks (dependencies of dependencies have been omitted):

| Library / Framework | 	Licence    |
|---------------------|--------------|
| Spring              | APL v2       |
| Titanium JSON-LD    | APL v2       |
| Reactor             | APL v2       |
| Jackson             | APL v2       |
| JUnit               | EPL v2       |
| Mockk               | APL v2       |
| JsonPath            | APL v2       |
| WireMock            | APL v2       |
| Testcontainers      | MIT          |

© 2020 - 2024 EGM