chrisbanes / gradle-mvn-push

Helper to upload Gradle Android Artifacts to Maven repositories
Apache License 2.0
1.05k stars 283 forks source link

Publish to my local maven repo. #34

Open yogurtearl opened 10 years ago

yogurtearl commented 10 years ago

Is there a way to publish to my local maven repo?

alopix commented 10 years ago

yes. set the RELEASE_REPOSITORY_URL and/or SNAPSHOT_REPOSITORY_URL to the corresponding local maven url, e.g.

RELEASE_REPOSITORY_URL=http://localhost:8080/repository/internal/
SNAPSHOT_REPOSITORY_URL=http://localhost:8080/repository/snapshots/
yogurtearl commented 10 years ago

I am not running a repo server. I was wondering about publishing to this: ~/.m2/repository/

johnjohndoe commented 9 years ago

You could use the android-maven-plugin:

// root build.gradle
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.2'
        classpath 'com.github.dcendents:android-maven-plugin:1.0'
    }
}
// library build.gradle
apply plugin: 'android-maven'
version = "1.0.0"
group = "com.example"
archivesBaseName = "awesome-library"
caseykulm commented 8 years ago

As part of this, you get access to the gradle maven plugin, and one of it's tasks https://docs.gradle.org/current/userguide/maven_plugin.html#N139B5 is install so

$ ./gradlew install

should do it

caseykulm commented 8 years ago

Not sure why yet, but install seems to not pull in all transitive dependencies. The generated pom file is incomplete

AlexanderLS commented 6 years ago

@yogurtearl @alopix @johnjohndoe @caseykulm You can publish to your local maven repo with https://github.com/Vorlonsoft/GradleMavenPush. Please read README.md before use it.

6. Build and Deploy/Install

You can now build and deploy on JCenter, Maven Central or Corporate staging/snapshot servers:

$ gradle deployOnServerRepository

Build and install on local Maven (~/.m2/repository/):

$ gradle installOnLocalRepository

Build and deploy on local Maven (~/.m2/repository/):

$ gradle deployOnLocalRepository