Skip to content

Commit

Permalink
modernize gradle and xtend (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdietrich authored May 24, 2024
1 parent 24a1a1c commit 5442083
Show file tree
Hide file tree
Showing 9 changed files with 286 additions and 185 deletions.
16 changes: 10 additions & 6 deletions examples/states-xtext/language-server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:2.0.8'
classpath 'org.xtext:xtext-gradle-plugin:4.0.0'
}
}

subprojects {
ext.xtextVersion = '2.26.0'
ext.xtextVersion = '2.34.0'
ext.sprottyVersion = '0.9.1'
ext.elkVersion = '0.8.1'

repositories {
mavenCentral()
}

apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
dependencies {
compile platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}")
api platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}")
}

apply plugin: 'org.xtext.xtend'
Expand All @@ -29,8 +31,10 @@ subprojects {
group = 'io.typefox.examples.theia.states'
//version = '1.0.0-SNAPSHOT'

sourceCompatibility = '11'
targetCompatibility = '11'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

configurations.all {
exclude group: 'asm'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//see https://docs.gradle.org/current/userguide/maven_plugin.html
apply plugin: 'maven'
publishing {
publications {
LocalMavenRepo(MavenPublication) {
}

uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://${buildDir}/localRepo")
snapshotRepository(url: "file://${buildDir}/localRepo")
}
}
}
repositories {
maven {
url = "$rootProject.buildDir/localRepo"
}
}
}
17 changes: 10 additions & 7 deletions examples/states-xtext/language-server/gradle/source-layout.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
sourceSets {
main {
java.srcDirs = ['src/main/java', 'src/main/xtext-gen']
resources.srcDirs = ['src/main/resources', 'src/main/xtext-gen']
xtendOutputDir = 'src/main/xtend-gen'
java.srcDir 'src/main/xtext-gen'
resources.srcDir 'src/main/xtext-gen'
xtend.outputDir = 'src/main/xtend-gen'
}
test {
java.srcDirs = ['src/test/java', 'src/test/xtext-gen']
resources.srcDirs = ['src/test/resources', 'src/test/xtext-gen']
xtendOutputDir = 'src/test/xtend-gen'
java.srcDir 'src/test/xtext-gen'
resources.srcDir 'src/test/xtext-gen'
xtend.outputDir = 'src/test/xtend-gen'
}
}

Expand All @@ -23,6 +23,9 @@ jar {
}
}


plugins.withId('war') {
webAppDirName = "src/main/webapp"
war {
webAppDirectory = file("src/main/webapp")
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 5442083

Please sign in to comment.