Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save outofcoffee/f2c6de12b57038fea8747d1856c7539f to your computer and use it in GitHub Desktop.

Select an option

Save outofcoffee/f2c6de12b57038fea8747d1856c7539f to your computer and use it in GitHub Desktop.

Revisions

  1. outofcoffee revised this gist Dec 13, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions gradle-kotlin-publish-s3-maven-repo.gradle
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,8 @@
    /*
    * Publish a Kotlin module to an S3 Maven repository, using Gradle.
    * This assumes that the AWS/IAM credentials have 'bucket list' as well as 'object put' and 'object get' permissions.
    */

    ext.version_kotlin = '1.0.5-2'

    buildscript {
  2. outofcoffee revised this gist Dec 13, 2016. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions gradle-kotlin-publish-s3-maven-repo.gradle
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,18 @@
    ext.version_kotlin = '1.0.5-2'

    buildscript {
    repositories {
    mavenCentral()
    }
    dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin"
    }
    }

    repositories {
    mavenCentral()
    }

    apply plugin: 'kotlin'
    apply plugin: 'maven-publish'

  3. outofcoffee created this gist Dec 13, 2016.
    29 changes: 29 additions & 0 deletions gradle-kotlin-publish-s3-maven-repo.gradle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    apply plugin: 'kotlin'
    apply plugin: 'maven-publish'

    dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib:$version_kotlin"

    // other dependencies...
    }

    publishing {
    publications {
    maven(MavenPublication) {
    groupId 'com.example'
    artifactId 'example'
    version '0.0.1-SNAPSHOT'
    from components.java

    repositories {
    maven {
    url 's3://your-s3-bucket/snapshots'
    credentials(AwsCredentials) {
    accessKey AWS_ACCESS_KEY // put this in gradle.properties
    secretKey AWS_SECRET_KEY // put this in gradle.properties
    }
    }
    }
    }
    }
    }