After installing and setting up Tink, continue with [Next Steps](https://developers.google.com/tink/setup/java#next_steps).

### Tink Java

The core Java library is
[tink-java](https://github.com/tink-crypto/tink-java) with [1.24.0](https://github.com/tink-crypto/tink-java/releases/tag/v1.24.0) as the latest release. Tink Java
supports Java 11 or newer.

## Maven

You can include Tink Java using [Maven](https://maven.apache.org/):

    <dependency>
      <groupId>com.google.crypto.tink</groupId>
      <artifactId>tink</artifactId>
      <version>1.24.0</version>
    </dependency>

## Bazel

[Bazel](http://bazel.build) users can add Tink Java as a dependency is by
adding the following in their `MODULE.bazel` file:

      bazel_dep(name = "tink_java", version = "1.24.0")

      git_override(
          module_name = "tink_java",
          remote = "https://github.com/tink-crypto/tink-java",
          tag = "v1.24.0",
      )

### Tink Android

The core Android library is
[tink-java](https://github.com/tink-crypto/tink-java) with [1.24.0](https://github.com/tink-crypto/tink-java/releases/tag/v1.24.0) as the latest release.

Tink Android is fully supported starting from API level 24. Most parts of
Tink are expected to work starting from API level 23. The parts where Tink
does not run out of the box with API level 23 are:

- The JWT library requires API level 24 since it uses classes such as
  `java.util.Optional`. This limitation can be avoided with
  [desugaring](https://developer.android.com/studio/write/java8-support-table).

- Some APIs in `com.google.crypto.tink.streamingaead` use
  `SeekableByteBufferChannel` which is only available from API level 24.

Due to technical reasons, we only test Tink on Android on Google internal
infrastructure. We don't expect any problems because of this, but if you
encounter any problems, please file an issue.

Tink Android requires no proguard configuration.

## Gradle

You can use `tink-android` from [Gradle](https://gradle.org/):

    dependencies {
      implementation 'com.google.crypto.tink:tink-android:1.24.0'
    }

### AWS KMS Extension

The Tink Java [AWS KMS](https://aws.amazon.com/kms/) extension is
[tink-java-awskms](https://github.com/tink-crypto/tink-java-awskms) with
[2.2.0](https://github.com/tink-crypto/tink-java-awskms/releases/tag/v2.2.0) as the latest
release.

## Maven

You can include the Tink Java AWS KMS extension using
[Maven](https://maven.apache.org/):

    <dependencies>
      <dependency>
        <groupId>com.google.crypto.tink</groupId>
        <artifactId>tink-awskms</artifactId>
        <version>2.2.0</version>
      </dependency>
    </dependencies>

## Bazel

### Maven release artifact

You can install the `com.google.crypto.tink:tink-awskms` Maven artifact
alongside `com.google.crypto.tink:tink` using the
[`rules_jvm_external`](https://github.com/bazelbuild/rules_jvm_external#rules_jvm_external) tool.

    # ...

    maven_install(
        artifacts = [
            "com.google.crypto.tink:tink:1.24.0",
            "com.google.crypto.tink:tink-awskms:2.2.0",
            # ... other dependencies ...
        ],
        repositories = [
            "https://maven.google.com",
            "https://repo1.maven.org/maven2",
        ],
    )

### Google Cloud KMS Extension

The Tink Java [Google Cloud KMS](https://cloud.google.com/kms/) extension is
[tink-java-gcpkms](https://github.com/tink-crypto/tink-java-gcpkms) with
[1.12.0](https://github.com/tink-crypto/tink-java-gcpkms/releases/tag/v1.12.0) as the latest
release.

## Maven

You can include the Tink Java Google Cloud KMS extension using
[Maven](https://maven.apache.org/):

    <dependencies>
      <dependency>
        <groupId>com.google.crypto.tink</groupId>
        <artifactId>tink-gcpkms</artifactId>
        <version>1.12.0/version>
      </dependency>
    </dependencies>

## Bazel

### Maven release artifact

You can install the `com.google.crypto.tink:tink-gcpkms` Maven artifact
alongside `com.google.crypto.tink:tink` using the
[`rules_jvm_external`](https://github.com/bazelbuild/rules_jvm_external#rules_jvm_external) tool.

    # ...

    maven_install(
        artifacts = [
            "com.google.crypto.tink:tink:1.24.0",
            "com.google.crypto.tink:tink-gcpkms:1.12.0",
            # ... other dependencies ...
        ],
        repositories = [
            "https://maven.google.com",
            "https://repo1.maven.org/maven2",
        ],
    )

### Build from source

Add the following to your `MODULE.bazel` file.

    bazel_dep(name = "tink_java_gcpkms")

    git_override(
        module_name = "tink_java_gcpkms",
        remote = "https://github.com/tink-crypto/tink-java-gcpkms",
        tag = "v1.12.0",
    )

### Tink Java Apps

The [Tink Java Apps](https://github.com/tink-crypto/tink-java-apps) library
provides implementations for [Google Payment Method Token](https://developers.google.com/pay/api/payment-data-cryptography),
[Server-Side Verification of Google AdMob Rewarded Ads](https://developers.google.com/admob/android/ssv), and
[RFC 8291 - Message Encryption for Web Push](https://www.rfc-editor.org/rfc/rfc8291) with [1.15.0](https://github.com/tink-crypto/tink-java-apps/releases/tag/v1.15.0) as the latest release.

## Maven

You can include the Tink Java Apps library using
[Maven](https://maven.apache.org/):

    <dependency>
      <groupId>com.google.crypto.tink</groupId>
      <artifactId>apps-webpush</artifactId>
      <version>1.15.0</version>
    </dependency>

    <dependency>
      <groupId>com.google.crypto.tink</groupId>
      <artifactId>apps-paymentmethodtoken</artifactId>
      <version>1.15.0</version>
    </dependency>

    <dependency>
      <groupId>com.google.crypto.tink</groupId>
      <artifactId>apps-rewardedads</artifactId>
      <version>1.15.0</version>
    </dependency>

## Bazel

You can install any of the `com.google.crypto.tink:apps-*` Maven artifacts
using the [`rules_jvm_external`](https://github.com/bazelbuild/rules_jvm_external#rules_jvm_external) tool.

    # ...

    maven_install(
        artifacts = [
            "com.google.crypto.tink:apps-webpush:1.15.0",
            "com.google.crypto.tink:apps-paymentmethodtoken:1.15.0",
            "com.google.crypto.tink:apps-rewardedads:1.15.0",
            # ... other dependencies ...
        ],
        repositories = [
            "https://maven.google.com",
            "https://repo1.maven.org/maven2",
        ],
    )

## Next steps

Once you've finished setting up Tink, continue with the standard Tink usage
steps:

- [Choose a primitive](https://developers.google.com/tink/choose-primitive) -- Decide which primitive to use based on your use case
- [Manage keys](https://developers.google.com/tink/key-management-overview) -- Protect your keys with your external KMS, generate keysets, and rotate your keys