Skip to content

Commit f07633f

Browse files
authored
Merge pull request #190 from xtext/oehme/java-8-support
Java 8 support and Plugin Portal publishing
2 parents c1736fa + 871fac9 commit f07633f

File tree

51 files changed

+383
-1471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+383
-1471
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,27 @@ on:
44
push:
55
branches:
66
- master
7-
tags:
8-
- '*'
97
pull_request:
108

119
jobs:
1210
build:
1311
name: Build
14-
runs-on: ubuntu-latest
15-
12+
strategy:
13+
matrix:
14+
java: [1.8]
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
runs-on: ${{ matrix.os }}
1617
steps:
1718
- uses: actions/checkout@v2
18-
- name: Set up JDK 1.8
19+
- name: Set up JDK
1920
uses: actions/setup-java@v1
2021
with:
21-
java-version: 1.8
22-
- id: get_version
23-
name: Get Version
24-
uses: battila7/get-version-action@v2
22+
java-version: ${{ matrix.java }}
2523
- name: Build
2624
uses: eskatos/gradle-command-action@v1
2725
with:
2826
arguments: build
2927
dependencies-cache-enabled: true
30-
- name: Release on tag
31-
if: startsWith(github.ref, 'refs/tags/')
32-
uses: eskatos/gradle-command-action@v1
33-
env:
34-
ORG_GRADLE_PROJECT_bintrayApiKey: ${{ secrets.ORG_GRADLE_PROJECT_BINTRAYAPIKEY }}
35-
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
36-
with:
37-
arguments: release "-PreleaseVersion=${{ steps.get_version.outputs.version }}"
38-
dependencies-cache-enabled: true
3928
- name: Store HTML test report
4029
uses: actions/upload-artifact@v2
4130
with:

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK 1.8
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 1.8
18+
- id: get_version
19+
name: Get Version
20+
uses: battila7/get-version-action@v2
21+
- name: Release
22+
uses: eskatos/gradle-command-action@v1
23+
env:
24+
ORG_GRADLE_PROJECT_gradle.publish.key: ${{ secrets.GRADLE_PUBLISH_KEY }}
25+
ORG_GRADLE_PROJECT_gradle.publish.secret: ${{ secrets.GRADLE_PUBLISH_SECRET }}
26+
with:
27+
arguments: release "-PreleaseVersion=${{ steps.get_version.outputs.version }}"
28+
dependencies-cache-enabled: true
29+
30+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ A set of [Gradle](http://gradle.org) plugins to build and use [Xtext](http://xte
55

66
The documentation is hosted on the [project's website](http://xtext.github.io/xtext-gradle-plugin/).
77

8-
To build and install locally run `./gradlew install -Dorg.gradle.project.version=<version>` e.g. with `<version>` set to `1.0.22-SNAPSHOT`.
8+
To build and install locally run `./gradlew pTML -PreleaseVersion=<version>` e.g. with `<version>` set to `1.0.22-SNAPSHOT`.

build.gradle

Lines changed: 3 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,25 @@
11
buildscript {
22
repositories {
3-
mavenCentral()
43
maven {
54
url "https://plugins.gradle.org/m2/"
65
}
76
}
87
dependencies {
98
classpath 'org.xtext:xtext-gradle-plugin:2.0.2'
10-
classpath 'com.github.oehme.sobula:sobula:0.6.7'
119
classpath 'com.netflix.nebula:nebula-project-plugin:4.0.1'
10+
classpath "com.gradle.publish:plugin-publish-plugin:0.15.0"
1211
}
1312
}
1413

15-
allprojects {
16-
apply plugin: 'com.github.oehme.sobula.plugin-release'
17-
18-
group = "org.xtext"
19-
bintray.pkg.name = "org.xtext:xtext-gradle-plugin"
20-
21-
contacts {
22-
23-
moniker "The Xtext team"
24-
roles "owner"
25-
github "xtext"
26-
}
27-
}
28-
29-
bintray.user = "xtext-team"
30-
bintray.pkg.version.mavenCentralSync.user = "xtext.team"
14+
apply from: "${rootDir}/gradle/xtend-bootstrap.gradle"
3115

16+
allprojects {
3217
repositories {
3318
mavenCentral()
34-
maven {
35-
url "https://plugins.gradle.org/m2/"
36-
}
3719
}
3820
}
3921

4022
subprojects {
41-
apply plugin: 'eclipse'
4223
apply plugin: 'java'
4324

4425
sourceCompatibility = 1.8
@@ -48,57 +29,7 @@ subprojects {
4829
}
4930

5031
dependencies {
51-
compile gradleApi()
52-
compile 'com.google.guava:guava:27.1-jre'
5332
testCompile 'junit:junit:4.12'
5433
testCompile 'org.ow2.asm:asm:6.1.1'
5534
}
5635
}
57-
58-
configure(subprojects.findAll{p-> !p.name.contains('protocol')}) {
59-
apply plugin: 'org.xtext.xtend'
60-
sourceJar.dependsOn generateXtext
61-
}
62-
63-
apply from: "${rootDir}/gradle/xtend-bootstrap.gradle"
64-
65-
configure(subprojects.findAll{p-> p.name.contains('plugin')}){
66-
apply plugin: 'java-gradle-plugin'
67-
apply plugin: 'nebula.facet'
68-
69-
jar {
70-
manifest {
71-
attributes("Implementation-Version": project.version)
72-
}
73-
}
74-
75-
facets {
76-
integTest {
77-
parentSourceSet = 'test'
78-
testTaskName = 'minimumIntegrationTest'
79-
}
80-
}
81-
82-
tasks.withType(Test) {
83-
def testkitDir = System.getenv("CI") ? gradle.gradleUserHomeDir : "$rootDir/testkit-dir"
84-
systemProperty 'gradle.project.version', version
85-
systemProperty 'org.gradle.testkit.dir', testkitDir
86-
}
87-
88-
minimumIntegrationTest {
89-
dependsOn("install")
90-
reports.html.destination = file("$testReportDir/$name")
91-
reports.junitXml.destination = file("$testResultsDir/$name")
92-
systemProperty 'xtext.version', minimumXtextVersion
93-
}
94-
95-
task latestIntegrationTest(type: Test) {
96-
classpath = minimumIntegrationTest.classpath
97-
testClassesDirs = minimumIntegrationTest.testClassesDirs
98-
dependsOn("install")
99-
systemProperty 'xtext.version', latestXtextVersion
100-
enabled = JavaVersion.current().java8Compatible
101-
}
102-
103-
check.dependsOn(latestIntegrationTest)
104-
}

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
minimumXtextVersion = 2.9.0
22
#We can't use 2.11 while we still want Java 6 support
33
bootstrapXtextVersion = 2.9.1
4-
latestXtextVersion = 2.14.0
4+
latestXtextVersion = 2.25.0
5+
minimumGradleVersion = 4.3
6+
latestGradleVersion = 6.9.1
57
systemProp.http.connectionTimeout=120000
68
systemProp.http.socketTimeout=120000

gradle/xtend-bootstrap.gradle

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
repositories {
2-
mavenCentral()
3-
}
4-
51
configurations {
62
xtendCompiler {
73
description 'Bootstrap dependencies for the Xtend compiler'
@@ -24,14 +20,14 @@ dependencies {
2420

2521
subprojects {
2622
plugins.withId('org.xtext.xtend') {
27-
dependencies {
28-
compile "org.eclipse.xtend:org.eclipse.xtend.lib:$minimumXtextVersion"
29-
}
23+
dependencies {
24+
compile "org.eclipse.xtend:org.eclipse.xtend.lib:$minimumXtextVersion"
25+
}
3026

31-
tasks.matching {it.class.simpleName.startsWith('XtextGenerate')}.all {
27+
tasks.matching {it.class.simpleName.startsWith('XtextGenerate')}.all {
3228
afterEvaluate {
3329
xtextClasspath = rootProject.configurations.xtendCompiler
3430
}
35-
}
31+
}
3632
}
3733
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
rootProject.name = 'xtext-gradle-plugin-root'
22

3-
include 'xtext-gradle-protocol', 'xtext-gradle-builder', 'xtext-gradle-plugin', 'xtext-idea-gradle-plugin', 'xtext-android-gradle-plugin'
3+
include 'xtext-gradle-protocol', 'xtext-gradle-builder', 'xtext-gradle-plugin'

xtext-android-gradle-plugin/.settings/org.eclipse.xtend.core.Xtend.prefs

Lines changed: 0 additions & 23 deletions
This file was deleted.

xtext-android-gradle-plugin/build.gradle

Lines changed: 0 additions & 11 deletions
This file was deleted.

xtext-android-gradle-plugin/src/main/java/org/xtext/gradle/android/XtendAndroidBuilderPlugin.xtend

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)