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
# copy script to ~/.gradle/init.gradle | |
gradle.projectsEvaluated { | |
allprojects { project -> | |
task printRepos() { | |
println("Project repositories: ${project.name}") | |
repositories { | |
all { ArtifactRepository repo -> |
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
install: | |
- FILE="-Dfile=jars/my-library.jar" | |
- mvn install:install-file $FILE -DgroupId=com.github.user -DartifactId=repo -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true |
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
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.dsl.RepositoryHandler | |
apply plugin:JitPackRepositoryPlugin | |
class JitPackRepositoryPlugin implements Plugin<Gradle> { | |
void apply(Gradle gradle) { |
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
apply plugin: 'digital.wup.android-maven-publish' | |
group = 'com.github.User' | |
version = '0.1' | |
task sourceJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
classifier "sources" | |
} |
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
protected MavenProject buildProjectModel(ArtifactInfo artifactInfo) throws Exception { | |
try { | |
ProjectBuildingRequest configuration = new DefaultProjectBuildingRequest(); | |
configuration.setLocalRepository( localRepository ); | |
configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL ); | |
configuration.setProcessPlugins( false ); | |
configuration.setRepositoryMerging( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT ); | |
Properties properties = new Properties( ); | |
for ( String key : session.getSystemProperties( ).keySet() ){ | |
properties.put( key, session.getSystemProperties().get(key) ); |
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
plugins { | |
id 'pl.allegro.tech.build.axion-release' version '1.2.3' | |
id 'java' | |
id 'maven' | |
} | |
scmVersion { | |
tag { | |
prefix = '' | |
serialize = {config, version -> "$version-RELEASE"} |