File tree 5 files changed +99
-3
lines changed
src/main/java/com/github/bsideup/jabel
5 files changed +99
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - prereleased
7
+ - released
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-18.04
12
+ steps :
13
+ - uses : actions/checkout@v1
14
+ - name : Set up JDK
15
+ uses : actions/setup-java@v1
16
+ with :
17
+ java-version : 14
18
+ - name : Deploy with Gradle
19
+ env :
20
+ GRADLE_PUBLISH_REPO_URL : ${{ secrets.GRADLE_PUBLISH_REPO_URL }}
21
+ GRADLE_PUBLISH_MAVEN_USER : ${{ secrets.GRADLE_PUBLISH_MAVEN_USER }}
22
+ GRADLE_PUBLISH_MAVEN_PASSWORD : ${{ secrets.GRADLE_PUBLISH_MAVEN_PASSWORD }}
23
+ run : ./gradlew --no-daemon -Pversion=$(git tag --points-at HEAD) publish
Original file line number Diff line number Diff line change 1
1
subprojects {
2
+ apply from : " $rootDir /gradle/publishing.gradle"
3
+
2
4
group = ' com.github.bsideup.jabel'
3
5
repositories {
4
6
jcenter()
5
7
}
8
+
9
+ plugins. withType(MavenPublishPlugin ) {
10
+ project. publishing {
11
+ repositories {
12
+ maven {
13
+ url System . getenv(' GRADLE_PUBLISH_REPO_URL' )
14
+ credentials {
15
+ username = System . getenv(' GRADLE_PUBLISH_MAVEN_USER' )
16
+ password = System . getenv(' GRADLE_PUBLISH_MAVEN_PASSWORD' )
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
6
22
}
Original file line number Diff line number Diff line change
1
+ plugins. withType(MavenPublishPlugin ) {
2
+ project. publishing {
3
+ publications {
4
+ mavenJava(MavenPublication ) { publication ->
5
+ pom {
6
+ description = ' Jabel - use modern Java 9-14 syntax when targeting Java 8.'
7
+ name = project. description ?: description
8
+ url = ' https://github.com/bsideup/jabel'
9
+ licenses {
10
+ license {
11
+ name = ' Apache License, Version 2.0'
12
+ url = ' https://www.apache.org/licenses/LICENSE-2.0.txt'
13
+ distribution = ' repo'
14
+ }
15
+ }
16
+ scm {
17
+ url = ' https://github.com/bsideup/jabel/'
18
+ connection = ' scm:git:git://github.com/bsideup/jabel.git'
19
+ developerConnection
= ' scm:git:ssh://[email protected] /bsideup/jabel.git'
20
+ }
21
+ developers {
22
+ developer {
23
+ id = ' bsideup'
24
+ name = ' Sergei Egorov'
25
+
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id " java"
3
- id " maven"
3
+ id " maven-publish "
4
4
}
5
5
6
6
sourceCompatibility = targetCompatibility = 8
7
7
8
8
dependencies {
9
9
compile ' net.bytebuddy:byte-buddy:1.10.14'
10
10
compile ' net.bytebuddy:byte-buddy-agent:1.10.14'
11
+ }
12
+
13
+
14
+ task sourcesJar (type : Jar ) {
15
+ classifier ' sources'
16
+ from sourceSets. main. allJava
17
+ }
18
+
19
+ javadoc {
20
+ options. source = " 8"
21
+ }
22
+
23
+ task javadocJar (type : Jar ) {
24
+ from javadoc
25
+ classifier = ' javadoc'
26
+ }
27
+
28
+ publishing {
29
+ publications {
30
+ mavenJava(MavenPublication ) { publication ->
31
+ from components. java
32
+ artifact sourcesJar
33
+ artifact javadocJar
34
+ }
35
+ }
11
36
}
Original file line number Diff line number Diff line change 4
4
import com .sun .tools .javac .code .Source .Feature ;
5
5
import net .bytebuddy .asm .Advice ;
6
6
7
- public class CheckSourceLevelAdvice {
7
+ class CheckSourceLevelAdvice {
8
8
9
9
@ Advice .OnMethodEnter
10
- public static void checkSourceLevel (
10
+ static void checkSourceLevel (
11
11
@ Advice .Argument (value = 1 , readOnly = false ) Feature feature
12
12
) {
13
13
if (feature .allowedInSource (Source .JDK8 )) {
You can’t perform that action at this time.
0 commit comments