Skip to content

Latest commit

 

History

History
115 lines (87 loc) · 2.49 KB

README.md

File metadata and controls

115 lines (87 loc) · 2.49 KB

Arrow Gradle config

Add basic config to a Kotlin Multiplatform project

In an Arrow KMP project, just add to the plugin block:

plugins {
    kotlin("multiplatform") version "$version"
    id("io.arrow-kt.arrow-gradle-config-kotlin")
    // ...
}

// ...

Publish Arrow projects

Add to the root build.gradle.kts the next plugin to the plugin block if it is not there yet:

plugins {
    id("io.arrow-kt.arrow-gradle-config-nexus") version "$version"
    // ...
}

Add the POM Gradle properties for the project (modify with the real value):

pom.name=Sample name
pom.description=Sample description
pom.url=https://github.com/arrow-kt/sample-repo
pom.license.name=The Apache License, Version 2.0
pom.license.url=https://www.apache.org/licenses/LICENSE-2.0.txt
pom.developer.id=arrow-kt
pom.developer.name=The Arrow Authors
pom.smc.url=https://github.com/arrow-kt/sample-repo
pom.smc.connection=scm:git:[email protected]:arrow-kt/sample-repo.git
pom.smc.developerConnection=scm:git:[email protected]:arrow-kt/sample-repo.git

And add the next Gradle properties and/or environment variables for signing the artifacts (they must not be exposed publicly):

  • Gradle properties
signing.gnupg.keyId=[keyId]
signing.gnupg.key=[key]
signing.gnupg.passphrase=[passphrase]
oss.user=[user]
oss.token=[token]
oss.stagingProfileId=[stagingProfileId]
  • Environment variables
SIGNING_KEY_ID=[keyId]
SIGNING_KEY=[key]
SIGNING_KEY_PASSPHRASE=[passphrase]
OSS_USER=[user]
OSS_TOKEN=[token]
OSS_STAGING_PROFILE_ID=[stagingProfileId]

Remember to replace the different properties with the real values

Remember to replace the signing.gnupg.key or SIGNING_KEY line breaks with \n

Publish projects

plugins {
    id("io.arrow-kt.arrow-gradle-config-publish") version "$version"
    // ...
}

// ...

Add the next properties to gradle.properties file

projects.group=[group]
projects.version=[version]

Remember to replace the different properties with the real values

if the project is a Gradle plugin

gradlePlugin {
    plugins {
        named("[pluginId]") {
            id = "[pluginId]"
            displayName = "[pluginName]"
            description = "[pluginDescription]"
        }
    }
}

// ...

Add the next Gradle properties (they must not be exposed publicly):

gradle.publish.key=[key]
gradle.publish.secret=[secret]

Remember to replace the different properties with the real values