Skip to content

Instantly share code, notes, and snippets.

@adrianbk
Created May 25, 2015 10:25
Show Gist options
  • Save adrianbk/c4982e5ebacc6b6ed902 to your computer and use it in GitHub Desktop.
Save adrianbk/c4982e5ebacc6b6ed902 to your computer and use it in GitHub Desktop.

Revisions

  1. adrianbk created this gist May 25, 2015.
    34 changes: 34 additions & 0 deletions gradle-s3-publish.gradle
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    apply plugin: 'java'
    apply plugin: 'maven-publish'

    repositories { jcenter() }
    dependencies { compile 'org.slf4j:slf4j-api:1.7.12' }

    publishing {
    repositories {
    maven {
    url "http://127.0.0.1:8081/artifactory/libs-release-local/"
    credentials {
    username "admin"
    password "password"
    }
    }

    maven {
    url "s3://gradle-maven-repo/libs-release-local"
    credentials(AwsCredentials) {
    accessKey "${System.getenv('AWS_KEY')}"
    secretKey "${System.getenv('AWS_SECRET')}"
    }
    }
    }

    publications {
    mavenJava(MavenPublication) {
    groupId 'com.me'
    artifactId 'sample-project'
    version '1.1'
    from components.java
    }
    }
    }