Created
February 13, 2018 08:15
-
-
Save alexcheng1982/12311d50ac0f3f990c1d71b1e27d14df to your computer and use it in GitHub Desktop.
Gradle publish to Maven repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
url "http://repository.jboss.org/nexus/content/groups/public/" | |
} | |
} | |
dependencies { | |
classpath 'org.hibernate.build.gradle:gradle-maven-publish-auth:2.0.1' | |
} | |
} | |
group 'com.mycompany' | |
version '1.0.0-SNAPSHOT' | |
apply plugin: 'maven-publish' | |
apply plugin: 'maven-publish-auth' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testCompile "junit:junit:4.12" | |
} | |
publishing { | |
repositories { | |
maven { | |
name "snapshots" | |
url "http://local.maven" | |
} | |
} | |
publications { | |
mavenJava(MavenPublication) { | |
from components.java | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment