Skip to content

Instantly share code, notes, and snippets.

@virtualmarc
Created September 18, 2013 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualmarc/495b79f8b4f866ab0f0a to your computer and use it in GitHub Desktop.
Save virtualmarc/495b79f8b4f866ab0f0a to your computer and use it in GitHub Desktop.
Gradle build file: creating empty jar and installs it into the local maven repository
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
apply plugin: 'maven'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 17
targetSdkVersion 17
}
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
}
group 'my.groupid'
version '1.0-SNAPSHOT'
uploadArchives {
repositories.mavenDeployer {
repository(url: "file:///home/gitlab_ci_runner/maven/")
pom.project {
name 'My project name'
description 'My project description'
url 'http://my.project.url'
inceptionYear '2013'
}
}
}
task myJar(type: Jar)
artifacts {
archives myJar
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment