-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- prereleased | ||
- released | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 14 | ||
- name: Deploy with Gradle | ||
env: | ||
GRADLE_PUBLISH_REPO_URL: ${{ secrets.GRADLE_PUBLISH_REPO_URL }} | ||
GRADLE_PUBLISH_MAVEN_USER: ${{ secrets.GRADLE_PUBLISH_MAVEN_USER }} | ||
GRADLE_PUBLISH_MAVEN_PASSWORD: ${{ secrets.GRADLE_PUBLISH_MAVEN_PASSWORD }} | ||
run: ./gradlew --no-daemon -Pversion=$(git tag --points-at HEAD) publish |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
subprojects { | ||
apply from: "$rootDir/gradle/publishing.gradle" | ||
|
||
group = 'com.github.bsideup.jabel' | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
plugins.withType(MavenPublishPlugin) { | ||
project.publishing { | ||
repositories { | ||
maven { | ||
url System.getenv('GRADLE_PUBLISH_REPO_URL') | ||
credentials { | ||
username = System.getenv('GRADLE_PUBLISH_MAVEN_USER') | ||
password = System.getenv('GRADLE_PUBLISH_MAVEN_PASSWORD') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
plugins.withType(MavenPublishPlugin) { | ||
project.publishing { | ||
publications { | ||
mavenJava(MavenPublication) { publication -> | ||
pom { | ||
description = 'Jabel - use modern Java 9-14 syntax when targeting Java 8.' | ||
name = project.description ?: description | ||
url = 'https://github.com/bsideup/jabel' | ||
licenses { | ||
license { | ||
name = 'Apache License, Version 2.0' | ||
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution = 'repo' | ||
} | ||
} | ||
scm { | ||
url = 'https://github.com/bsideup/jabel/' | ||
connection = 'scm:git:git://github.com/bsideup/jabel.git' | ||
developerConnection = 'scm:git:ssh://[email protected]/bsideup/jabel.git' | ||
} | ||
developers { | ||
developer { | ||
id = 'bsideup' | ||
name = 'Sergei Egorov' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
plugins { | ||
id "java" | ||
id "maven" | ||
id "maven-publish" | ||
} | ||
|
||
sourceCompatibility = targetCompatibility = 8 | ||
|
||
dependencies { | ||
compile 'net.bytebuddy:byte-buddy:1.10.14' | ||
compile 'net.bytebuddy:byte-buddy-agent:1.10.14' | ||
} | ||
|
||
|
||
task sourcesJar(type: Jar) { | ||
classifier 'sources' | ||
from sourceSets.main.allJava | ||
} | ||
|
||
javadoc { | ||
options.source = "8" | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
from javadoc | ||
classifier = 'javadoc' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { publication -> | ||
from components.java | ||
artifact sourcesJar | ||
artifact javadocJar | ||
} | ||
} | ||
} |
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