Skip to content

Commit

Permalink
Merge pull request #1002 from HaxeFoundation/develop
Browse files Browse the repository at this point in the history
Merge develop branch down to master
  • Loading branch information
EricBishton committed Jul 26, 2020
2 parents 6091e2c + 6554472 commit 6fe1948
Show file tree
Hide file tree
Showing 415 changed files with 17,939 additions and 5,353 deletions.
58 changes: 38 additions & 20 deletions .travis.yml
@@ -1,17 +1,44 @@
sudo: required
language: java
install:
- true
env:
- IDEA_VERSION=2016.3.8
- IDEA_VERSION=2017.3.5
- IDEA_VERSION=2018.2.8
- IDEA_VERSION=2019.1.1
os:
- linux
- osx

osx_image: xcode9.3
# We had to remove the matrix and list the builds by hand because Travis
# changed how blank dashes in a key were used (caused errors, but empty
# strings worked better), and osx will fail to parse this file if a mac
# target has a jdk entry.
jobs:
include:
- os: osx
osx_image: xcode9.3
env: IDEA_VERSION=2019.2

- os: linux
env: IDEA_VERSION=2019.3.5
jdk: openjdk8
- os: linux
env: IDEA_VERSION=2019.2.4
jdk: openjdk8
- os: linux
env: IDEA_VERSION=2019.1.4
jdk: openjdk8
- os: linux
env: IDEA_VERSION=2018.2.8
jdk: openjdk8
- os: linux
env: IDEA_VERSION=2017.3.5
jdk: openjdk8
- os: linux
env: IDEA_VERSION=2016.3.8
jdk: openjdk8

# Build and push the nightly (EAP) version.
- if: branch = develop AND type = push
script: make
env:
- IDEA_VERSION=2018.1.6 PLUGIN_VERSION=18 DEV_BUILD=.dev.${TRAVIS_COMMIT::7}
after_success:
- curl -k -i -F "userName=$PLUGIN_USER_NAME" -F "password=$PLUGIN_USER_PASS" -F channel=EAP -F pluginId=6873 -F "file=@intellij-haxe-$PLUGIN_VERSION.jar" https://plugins.jetbrains.com/plugin/uploadPlugin


before_script: |
#Linux
Expand All @@ -35,14 +62,5 @@ before_script: |
script:
- ./gradlew clean Build verifyPlugin -PgenerateHxcppDebugger=false -PtargetVersion=$IDEA_VERSION -PdevBuild=$DEV_BUILD


notifications:
email: false
jobs:
include:
- if: branch = develop AND type = push
script: make
env:
- IDEA_VERSION=2018.1.6 PLUGIN_VERSION=18 DEV_BUILD=.dev.${TRAVIS_COMMIT::7}
after_success:
- curl -k -i -F "userName=$PLUGIN_USER_NAME" -F "password=$PLUGIN_USER_PASS" -F channel=EAP -F pluginId=6873 -F "file=@intellij-haxe-$PLUGIN_VERSION.jar" https://plugins.jetbrains.com/plugin/uploadPlugin
email: false
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Expand Up @@ -35,14 +35,14 @@ Install the following plugins [from Intellij IDEA plugin manager](https://www.je
#### Required
- Plugin DevKit
- UI Designer
- Gradle Support
- Grammar-Kit (for bnf compilation) version 1.2.0. (Later versions are not backward compatible with IDEA 14.)
- [Gradle](https://plugins.jetbrains.com/plugin/13112-gradle)
- [Grammar-Kit](https://plugins.jetbrains.com/plugin/6606-grammar-kit) (for bnf compilation) version 1.2.0. (Later versions are not backward compatible with IDEA 14.)

#### Testing
- JUnit

#### Optional, install if you want to modify lexer/parser:
- JFlex (for lexer compilation)
- [JFlex Support](https://plugins.jetbrains.com/plugin/263-jflex-support) (for lexer compilation)

IntelliJ IDEA uses the Grammar-Kit plugin to generate its lexer and parser for Haxe and HXML.
The grammar file for Haxe is [haxe.bnf](https://github.com/HaxeFoundation/intellij-haxe/blob/develop/grammar/haxe.bnf).
Expand Down Expand Up @@ -120,7 +120,7 @@ ___________
Contributors are expected to have and build against each of the latest
sub-release of each major and minor version of IDEA that is supported
by the plugin team. At the time of this writing, that would be 2016.1.4,
2016.2.5, 2016.3.7, 2017.1.5, and 2017.2.6, and 2017.3.3.
2016.2.5, 2016.3.7, 2017.1.5, and 2017.2.6, 2017.3.3, 2018.x, and 2019.1.
As new versions are released this will continue to be
a moving target, as we attempt to keep up with the development community.

Expand Down
30 changes: 27 additions & 3 deletions build.gradle
@@ -1,6 +1,6 @@
/*
* Copyright 2018-2018 m0rkeulv
* Copyright 2019 Eric Bishton
* Copyright 2019-2020 Eric Bishton
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@

plugins {
id 'de.undercouch.download' version '3.3.0'
id 'org.jetbrains.intellij' version '0.3.12'
id 'org.jetbrains.intellij' version '0.4.9'
}


Expand Down Expand Up @@ -58,6 +58,7 @@ allprojects {
//Note: path is system directory separator sensitive, file.absolutePath solves this for us
grammarHaxe = file("${haxePluginDir}/grammar/haxe.bnf").absolutePath
grammarHxml = file("${haxePluginDir}/grammar/hxml.bnf").absolutePath
grammarMetadata = file("${haxePluginDir}/grammar/metadata.bnf").absolutePath

flexDownloadFile = "idea-flex-${ideaVersion}.skeleton"
flexTargetFile = "idea-flex.skeleton"
Expand All @@ -78,8 +79,16 @@ allprojects {
version = "IU-${ideaVersion}"
pluginName = "intellij-haxe-${ideaVersion}"
ideaDependencyCachePath "${ideaBaseDir}"
// Specify the sandbox so that Gradle doesn't try to make it relative to each sub-project.
sandboxDirectory "${project.rootDir}/build/idea-sandbox"
// Don't let gradle fill in since/until, we fill them via patchCustomTags using the properties file.
updateSinceUntilBuild false
// Include the "java" built-in plugin for 2019.2 and later builds.
String[] versionInfo = "${ideaVersion}".split("\\.")
if (versionInfo.size() >= 2 && (versionInfo[0].toInteger() > 2019 || (versionInfo[0].toInteger() == 2019 && versionInfo[1].toInteger() >= 2))) {
System.println("Including java plugin for version >= 2019.2")
plugins 'java' // 2019.2 + only. Causes build errors on earlier versions.
}
}
}

Expand Down Expand Up @@ -139,7 +148,10 @@ dependencies {
}

runIde {
jbreVersion 'jbrex8u152b1248.6'
jbrVersion '8u152b1343.26'

/* Propagate VM options from gradle command line through to the plugin. */
systemProperties = System.getProperties()
}

compileJava {
Expand Down Expand Up @@ -247,6 +259,14 @@ task generateHxmlParser(dependsOn: ':setupTools', type: JavaExec, group: 'genera
outputs.upToDateWhen { file("${generatedSrcDir}/com/intellij/plugins/haxe/hxml").exists() }
}

task generateMetadataParser(dependsOn: ':setupTools', type: JavaExec, group: 'generate') {
workingDir = "${toolDir}"
main '-jar'
args = ['grammar-kit.jar', "${generatedSrcDir}", "${grammarMetadata}"]

inputs.file "${grammarMetadata}"
outputs.upToDateWhen { file("${generatedSrcDir}/com/intellij/plugins/haxe/metadata").exists() }
}

import groovy.xml.MarkupBuilder
import org.apache.tools.ant.filters.ReplaceTokens
Expand All @@ -273,6 +293,7 @@ task generateSources(group: 'generate') {
dependsOn 'generateVersionSpecificSources'
dependsOn 'generateHaxeParser'
dependsOn 'generateHxmlParser'
dependsOn 'generateMetadataParser'
}

Properties findSdkValuesAndProperties(File buildFile) {
Expand All @@ -294,6 +315,9 @@ Properties findSdkValuesAndProperties(File buildFile) {
// Lookup table for properties files. Add new versions here.
def propertiesFile = ""
switch (Integer.valueOf(codeLine, 10)) {
case 195: propertiesFile = "idea_v19.properties"; break
case 194: propertiesFile = "idea_v19.properties"; break
case 193: propertiesFile = "idea_v19.properties"; break
case 192: propertiesFile = "idea_v19.properties"; break
case 191: propertiesFile = "idea_v19.properties"; break
case 183: propertiesFile = "idea_v18.properties"; break
Expand Down
9 changes: 6 additions & 3 deletions gradle.properties
@@ -1,6 +1,6 @@
#
# Copyright 2018-2018 m0rkeulv
# Copyright 2019 Eric Bishton
# Copyright 2019-2020 Eric Bishton
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,15 +16,18 @@
#
#

# Use the build cache
org.gradle.caching=true

# Avoid file locks on windows
org.gradle.daemon.idletimeout=1

# Avoid out of memmory on compile
org.gradle.jvmargs=-Xms512m -Xmx512m

defaultIdeaVersion=2019.1.1
defaultIdeaVersion=2019.3.5

latest2019Version=2019.1.1
latest2019Version=2019.3.5
latest2018Version=2018.3.6
latest2017Version=2017.3.5
latest2016Version=2016.3.8
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 17 additions & 1 deletion gradlew
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down

0 comments on commit 6fe1948

Please sign in to comment.