Skip to content

Commit

Permalink
Merge 3bc7d59 into fb04285
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Feb 23, 2020
2 parents fb04285 + 3bc7d59 commit f0f2d69
Show file tree
Hide file tree
Showing 156 changed files with 852 additions and 1,130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ scripts/libs
scripts/jars
scripts/wollok-site
scripts/wollok-cli
/.metadata/

# Ignoring wollok-language files
org.uqbar.project.wollok.lib/src/wollok/*.wlk
20 changes: 9 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ dist: trusty
sudo: false
jdk:
- oraclejdk8
addons:
apt:
packages:
- at-spi2-core
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
before_install:
- df -h
- openssl aes-256-cbc -K $encrypted_1cc7b892dc78_key -iv $encrypted_1cc7b892dc78_iv
Expand All @@ -28,7 +36,7 @@ script:
- echo "Running with profiles $PROFILES"
- echo "Running with UPDATE_SITE $UPDATE_SITE"
- export MAVEN_OPTS=-Xmx2048m
- mvn -e -Darguments='-Dtycho.disableP2Mirrors=true' -Dtycho.disableP2Mirrors=true
- mvn -e -Darguments='-Dtycho.disableP2Mirrors=false' -Dtycho.disableP2Mirrors=false
-U -DTRAVIS_JOB_ID=$TRAVIS_JOB_ID clean install jacoco:report coveralls:report -P
$PROFILES
- rm -rf /home/travis/.m2/repository/org/uqbar-project
Expand Down Expand Up @@ -127,16 +135,6 @@ deploy:
on:
all_branches: true
condition: "$UPDATE_SITE =~ ^dev|stable$"
- provider: releases
skip_cleanup: true
api_key:
secure: ZGDMxFYXbp/LgNqtGourJXgQS2itBxHWzLqDKnSd1YV6sDHnYzvrq8aCoLHujMCI0yLkRAI12raylJkXHzQHcN3JDF0SyJostz59x1KEJ4cpv8K5bb2bs8BsV/BuZlQssu6yqqgaIXOALF52wUGgVg8nBjWA0LdRL5DDFs8ExR0=
file_glob: true
file: results-products/*.zip
on:
tags: true
all_branches: true
repo: uqbar-project/wollok
env:
global:
secure: IJCZW9xrLlUjs/HRkrpagk06zo2+FvKaMygUk6K9Fdim3uSsLmn4UyBazNli0a62oq3XuNpscsCmdVtofUCfZphEHnyIUUTToQ+u6j1KxbICjfIGFMmUEoY/7tZVscQ5SBgiqtEVfUvolN6v4YUtx2FwaS27FW5SV3/x8j6toPw=
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ This is the main repository for the Wollok Xtext-based implementation, which is
You have two options to download an use Wollok.
**Download a complete Wollok Product Distribution**:

* Linux: [32](http://download.uqbar.org/wollok/products/stable/wollok-linux.gtk.x86.zip) / [64](http://download.uqbar.org/wollok/products/stable/wollok-linux.gtk.x86_64.zip) bits
* Mac [32](http://download.uqbar.org/wollok/products/stable/wollok-macosx.cocoa.x86.zip) / [64](http://download.uqbar.org/wollok/products/stable/wollok-macosx.cocoa.x86_64.zip) bits
* Windows [32](http://download.uqbar.org/wollok/products/stable/wollok-win32.win32.x86.zip) / [64](http://download.uqbar.org/wollok/products/stable/wollok-win32.win32.x86_64.zip) bits
* Linux [64](http://download.uqbar.org/wollok/products/stable/wollok-linux.gtk.x86_64.zip) bits
* Mac [64](http://download.uqbar.org/wollok/products/stable/wollok-macosx.cocoa.x86_64.zip) bits
* Windows [64](http://download.uqbar.org/wollok/products/stable/wollok-win32.win32.x86_64.zip) bits

**Update Site (if you already have a compatible eclipse)**:
* http://update.uqbar.org/wollok/stable : for the latest stable release
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- cmd: SET M2_HOME=C:\maven\apache-maven-3.2.5
build_script:
- cd org.uqbar.project.wollok.releng/
- mvn clean install -U -Darguments='-Dtycho.disableP2Mirrors=true' -Dtycho.disableP2Mirrors=true
- mvn clean install -U -Darguments='-Dtycho.disableP2Mirrors=false' -Dtycho.disableP2Mirrors=false
test_script:
- echo Already run :)
cache:
Expand Down
94 changes: 41 additions & 53 deletions changeVersions.sh
Original file line number Diff line number Diff line change
@@ -1,75 +1,63 @@
#!/bin/bash
function replace() {
OLD_TEXT=$1
NEW_TEXT=$2
FILE=$3
echo -e "\t" $FILE
sed -e "s#$OLD_TEXT#$NEW_TEXT#g" $FILE > $FILE.tmp
rm $FILE
mv $FILE.tmp $FILE
}

function replaceMultiline() {
OLD_TEXT=$1
NEW_TEXT=$2
FILE=$3
echo -e "\t" $FILE
cat $FILE | tr '\n' '\f' | sed -e "s#$OLD_TEXT#$NEW_TEXT#g" | tr '\f' '\n' > $FILE.tmp
rm $FILE
mv $FILE.tmp $FILE
}

NEW_VERSION=$1

echo "Updating to version $NEW_VERSION:"

echo -e "\t - POM"
for i in `find . -name "pom.xml" -not -path "./.metadata/*" -not -path "*/target/*" -not -path "*/META-INF/maven/*"`; do
sed -e "s#\(.*\)<version>[0-9][\.0-9]*-SNAPSHOT</version>\(.*\)#\1<version>$NEW_VERSION-SNAPSHOT</version>\2#g" $i > $i.tmp
rm $i
mv $i.tmp $i
done

echo -e "\t - MANIFEST VERSIONS"
for i in `find . -name "MANIFEST.MF" | grep -E "uqbar|xinterpreter" | grep -v "/target"`; do
sed -e "s#Bundle-Version: \(.*\)#Bundle-Version: $NEW_VERSION.qualifier#g" $i > $i.tmp
rm $i
mv $i.tmp $i
done
echo -e "- POM (this could take a while)"
cd org.uqbar.project.wollok.releng
mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$NEW_VERSION
cd ..

echo -e "\t - MANIFESTS DEPENDENCIES"
echo -e "- MANIFEST VERSIONS"
for i in `find . -name "MANIFEST.MF" | grep -E "uqbar|xinterpreter" | grep -v "/target"`; do
grep "bundle-version=\"" $i | grep -E "uqbar|xinterpreter" > /dev/null
if [ $? -eq 0 ] ; then
# echo "Modifying $i..."
sed -e "s#\(.*\)org\.uqbar\(.*\)bundle-version=\"[0-9][\.0-9]*\"\(.*\)#\1org\.uqbar\2bundle-version=\"$NEW_VERSION\"\3#g" $i > $i.tmp
rm $i
mv $i.tmp $i
fi
replace "Bundle-Version: \(.*\)" "Bundle-Version: $NEW_VERSION" $i
done

echo -e "\t - FEATURES"
echo -e "- FEATURES"
for i in `find . -name "feature.xml" | grep -E "uqbar|xinterpreter" | grep -v "/target"`; do
sed -e "s#\(.*\)version=\"[0-9][\.0-9]*\.qualifier\"\(.*\)#\1version=\"$NEW_VERSION.qualifier\"\2#g" $i > $i.tmp
rm $i
mv $i.tmp $i

sed -e "s#\(.*\)plugin=\"org\.uqbar\.project\.wollok\" version=\"[0-9][\.0-9]*\"\(.*\)#\1plugin=\"org.uqbar.project.wollok\" version=\"$NEW_VERSION\"\2#g" $i > $i.tmp
rm $i
mv $i.tmp $i

replaceMultiline "label=\"Wollok Language Feature\"\f version=\"[0-9][\.0-9]*\"" "label=\"Wollok Language Feature\"\f version=\"$NEW_VERSION\"" $i
done

echo -e "\t - PRODUCT"
for i in `find . -name "*.product" -type f | grep -E "uqbar|xinterpreter" | grep -v "/target"`; do
sed -e "s#[0-9]\.[0-9]\.[0-9]\.qualifier#$NEW_VERSION.qualifier#g" $i > $i.tmp
rm $i
mv $i.tmp $i

sed -e "s#Version\ [0-9]\.[0-9]\.[0-9]#Version\ $NEW_VERSION#g" $i > $i.tmp
rm $i
mv $i.tmp $i
echo -e "- PRODUCT"
for i in `find . -name "*.product" -type f`; do
replace "version=\"[0-9]\.[0-9]\.[0-9]\"" "version=\"$NEW_VERSION\"" $i
replace "Version\ [0-9]\.[0-9]\.[0-9]" "Version\ $NEW_VERSION" $i
done


echo -e "\t - CATEGORY"
echo -e "- CATEGORY"
for i in `find . -name "category.xml" -type f | grep -E "uqbar|xinterpreter" | grep -v "/target"`; do
sed -e "s#[0-9]\.[0-9]\.[0-9]\.qualifier#$NEW_VERSION.qualifier#g" $i > $i.tmp
rm $i
mv $i.tmp $i
replace "[0-9]\.[0-9]\.[0-9]" "$NEW_VERSION" $i
done

echo -e "\t - CODE"
i=`find . -name "Wollok.xtend" -not -path "*/target/*" `
sed -e "s#[0-9]\.[0-9]\.[0-9]#$NEW_VERSION#g" $i > $i.tmp
rm $i
mv $i.tmp $i
echo -e "- CODE"
i=`find . -name "Wollok.xtend" -not -path "*/target/*"`
replace "[0-9]\.[0-9]\.[0-9]" "$NEW_VERSION" $i

echo -e "\t - ABOUT TEXT"
echo -e "- ABOUT TEXT"
i="org.uqbar.project.wollok.product/plugin.xml"
sed -e "s#Version [0-9]\.[0-9]\.[0-9]#Version $NEW_VERSION#g" $i > $i.tmp
rm $i
mv $i.tmp $i
replace "Version [0-9]\.[0-9]\.[0-9]" "Version $NEW_VERSION" $i

CURRENT_YEAR=`date +'%Y'`
replace "Copyright 2014-[0-9]*" "Copyright 2014-$CURRENT_YEAR" $i

echo "Done !"
3 changes: 2 additions & 1 deletion org.uqbar.project.wollok.game/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Import-Package: org.junit;version="4.11.0",
org.uqbar.project.wollok.interpreter.core,
org.uqbar.project.wollok.interpreter.nativeobj
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtend.lib;bundle-version="2.11.0",
Require-Bundle: org.eclipse.xtend.lib,
org.apache.log4j,
org.uqbar.project.wollok,
org.eclipse.osgi
Expand Down Expand Up @@ -82,3 +82,4 @@ Export-Package: .,
org.uqbar.project.wollok.game.helpers,
org.uqbar.project.wollok.game.listeners
Bundle-Vendor: Uqbar Project
Automatic-Module-Name: org.uqbar.project.wollok.game
22 changes: 0 additions & 22 deletions org.uqbar.project.wollok.game/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,6 @@
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.13.102</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
<version>1.3.110</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
<version>1.2.101</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.codegen</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Image {
this.path = path
}

override public int hashCode() {
override int hashCode() {
val prime = 31
prime + getPath.hashCode
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ abstract class Position {

def int getYinPixels() { y * Gameboard.instance.cellsize }

override public int hashCode() {
override int hashCode() {
val prime = 31
val result = prime + x
prime * result + y
Expand Down Expand Up @@ -91,8 +91,8 @@ abstract class Position {

@Accessors
class WGPosition extends Position {
private int x = 0
private int y = 0
int x = 0
int y = 0

new() { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Label
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
import com.badlogic.gdx.scenes.scene2d.ui.Table
import org.uqbar.project.wollok.game.VisualComponent
import org.uqbar.project.wollok.game.WGPosition

class GameboardInputProcessor implements InputProcessor {

Expand All @@ -25,10 +23,10 @@ class GameboardInputProcessor implements InputProcessor {
}

override boolean touchDown(int x, int y, int pointer, int button) {
val inverseY = Gameboard.getInstance().pixelHeight() - y
val position = new WGPosition(x / Gameboard.instance.cellsize, inverseY / Gameboard.instance.cellsize )
// val inverseY = Gameboard.getInstance().pixelHeight() - y
// val position = new WGPosition(x / Gameboard.CELLZISE, inverseY / Gameboard.CELLZISE )

val Iterable<VisualComponent> lista = Gameboard.getInstance.getComponentsInPosition(position)
// val Iterable<VisualComponent> lista = Gameboard.getInstance.getComponentsInPosition(position)

//System.out.println("Click en " + x + "," + y + " con boton" + button)
//System.out.println("Hay " + lista.size + " elementos")
Expand Down Expand Up @@ -56,7 +54,7 @@ class GameboardInputProcessor implements InputProcessor {

}

public class MenuBuilder {
class MenuBuilder {

def static ScrollPane buildMenu(int x, int y) {
val font = new BitmapFont() => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import com.badlogic.gdx.graphics.OrthographicCamera

class GameboardRendering implements ApplicationListener {

private Gameboard gameboard
private Window window
Gameboard gameboard
Window window

new (Gameboard gameboard) {
this.gameboard = gameboard
Expand Down
14 changes: 8 additions & 6 deletions org.uqbar.project.wollok.launch/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ Require-Bundle: org.eclipse.ui,
org.uqbar.project.wollok,
org.eclipse.debug.core;bundle-version="3.8.0",
org.eclipse.debug.ui;bundle-version="3.9.0",
org.eclipse.jdt.debug;bundle-version="3.8.0",
org.eclipse.jdt.core;bundle-version="3.9.2",
org.eclipse.jdt.launching;bundle-version="3.7.1",
org.eclipse.jdt.debug,
org.eclipse.jdt.core,
org.eclipse.jdt.launching,
org.apache.commons.cli,
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.jface.text;bundle-version="3.8.101",
org.eclipse.ui.workbench.texteditor;bundle-version="3.8.101",
org.eclipse.xtext.ui;bundle-version="2.11.0",
org.eclipse.xtext.ui,
org.eclipse.ui.ide;bundle-version="3.10.2",
org.eclipse.xtend.lib;bundle-version="2.11.0",
org.eclipse.xtend.lib,
org.uqbar.project.wollok.lib,
org.eclipse.xtext.ui.shared;bundle-version="2.11.0",
org.eclipse.xtext.ui.shared,
org.junit;bundle-version="4.11.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: lib/lipermi-0-4-2.jar,
Expand All @@ -37,3 +38,4 @@ Export-Package: org.uqbar.project.wollok.contextState.server,
org.uqbar.project.wollok.launch.io,
org.uqbar.project.wollok.launch.setup,
org.uqbar.project.wollok.launch.tests
Automatic-Module-Name: org.uqbar.project.wollok.launch
24 changes: 0 additions & 24 deletions org.uqbar.project.wollok.launch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,11 @@
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.13.102</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
<version>1.3.110</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
<version>1.2.101</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>org.eclipse.emf.codegen</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies>
</plugin>
<!-- copy all dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
Expand All @@ -75,7 +52,6 @@
<!-- create WDKs -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.4</version>
<configuration>
<descriptors>
<descriptor>assembly/wollok-assembly.xml</descriptor>
Expand Down
Loading

0 comments on commit f0f2d69

Please sign in to comment.