plugins {
id 'maven-publish'
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'com.github.깃헙아이디'
artifactId = '깃헙프로젝트명'
version = '버전'
from components.java
}
}
}
gradle wrapper 파일 push
Github에 Release하기 (Git Tag로 버전명 명시)
Github repository 명으로 검색
해당하는 버전 Get it
빌드가 끝나고 Log 정상 노출 확인
import할 프로젝트의 build.gradle에 추가
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.깃헙아이디:깃헙프로젝트명:버전'
}