Skip to content

Commit

Permalink
Merge pull request #39 from MarcoFalke/jwiki121
Browse files Browse the repository at this point in the history
Bump to jwiki-v1.2.1
  • Loading branch information
fastily authored Oct 30, 2016
2 parents df6255c + 08e10a2 commit fd87c8e
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: java
jdk:
- oraclejdk8
script: ant
install: echo "pass"
script: gradle
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ This java program requires a minimum version of Java 8 installed. Consult [the w
[Download the precompiled jar file](https://github.com/Commonists/GlobalReplace/releases) or build it yourself after downloading the source with a simple

```
ant
gradle
```

You need [Apache Ant](http://ant.apache.org) installed.
You need [Apache Ant](http://ant.apache.org) and Gradle installed.

### Windows exe
To also build the windows exe:
Expand Down
45 changes: 45 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
defaultTasks 'globalreplace_jar'

def dir_src = "src/globalreplace"
def dir_build = "ant_build"
def dir_libs = "libs"
def dir_dist = "ant_dist"
def dir_launch4j = "launch4j"

apply plugin:'java'
repositories {
jcenter()
}
dependencies {
compile 'fastily:jwiki:1.2.1'
}

task copy_deps_for_ant(type: Copy) {
from configurations.compile
into dir_libs
}

task compile(dependsOn: copy_deps_for_ant) << {
delete dir_build
mkdir dir_build

ant.javac(srcdir: dir_src, classpath: dir_libs + "/jwiki-1.2.1.jar", destdir: dir_build)
}

task globalreplace_jar(dependsOn: compile) << {
ant.jar(destfile: dir_dist + "/globalreplace.jar", filesetmanifest: "mergewithoutmain"){
manifest {
delegate.attribute(name: "Main-Class", value: "globalreplace.GlobalReplace")
delegate.attribute(name: "Class-Path", value: ".")
}
fileset(dir: dir_build)
fileset(dir: dir_libs)
}
ant.echo("Jar file created.")
}

task dist(dependsOn: globalreplace_jar) << {
ant.taskdef( name: "launch4j", classname: "net.sf.launch4j.ant.Launch4jTask", classpath: dir_launch4j + "/launch4j.jar:" + dir_launch4j + "/lib/xstream.jar")
ant.launch4j(configFile: dir_dist + "/launch4jconfig.xml")
ant.echo("Windows executable created.")
}
36 changes: 0 additions & 36 deletions build.xml

This file was deleted.

Binary file removed lib/jwiki-v1.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/globalreplace/FGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import javax.swing.JPasswordField;
import javax.swing.JTextField;

import jwiki.core.Wiki;
import fastily.jwiki.core.Wiki;

/**
* Static GUI factories to make building tools easier.
Expand Down
13 changes: 6 additions & 7 deletions src/globalreplace/GlobalReplace.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package globalreplace;

import jwiki.core.ColorLog;
import jwiki.core.Wiki;
import jwiki.util.FL;
import jwiki.util.Tuple;
import fastily.jwiki.core.ColorLog;
import fastily.jwiki.core.Wiki;
import fastily.jwiki.util.Tuple;

import java.time.LocalDateTime;
import java.util.ArrayList;
Expand All @@ -23,7 +22,7 @@ public class GlobalReplace {
private static final String NAME = "GlobalReplace";
private static final String COMMONS_PAGE = "Commons:" + NAME;
private static final String SIGN_UP = COMMONS_PAGE + "/Sign-in";
private static final byte[] VERSION_NUM = new byte[] { 0, 6, 5 };// {major},{minor},{fix}
private static final byte[] VERSION_NUM = new byte[] { 0, 6, 6 };// {major},{minor},{fix}
private static final String VERSION = "v" + VERSION_NUM[0] + "."
+ VERSION_NUM[1] + "." + VERSION_NUM[2];
private static final String TITLE = "GlobalReplace " + VERSION;
Expand Down Expand Up @@ -188,8 +187,8 @@ private void doJob() {
BAR.setValue(0);
BUTTON.setEnabled(false);
this.setTextFieldState(false);
ArrayList<Tuple<String, String>> list = FL.mapToList(wiki.globalUsage("File:"
+ this.old_name));
ArrayList<Tuple<String, String>> list = wiki.globalUsage("File:"
+ this.old_name);
BUTTON.setEnabled(true);
if (list == null || list.size() == 0) {
BAR.setString(String.format("'%s' is not globally used",
Expand Down

0 comments on commit fd87c8e

Please sign in to comment.