Skip to content

Commit

Permalink
Gemified.
Browse files Browse the repository at this point in the history
  * removed all the swt and jface jars that are now in the swt gem
  * rake build:prepare copies those jars into lib for the ant build
  * javamateview handles loading the joni, jdom and jcodings jars itself.
  * added LICENSE, gemspec
  • Loading branch information
danlucraft committed Jun 12, 2011
1 parent c9ccc5e commit 0759843
Show file tree
Hide file tree
Showing 30 changed files with 105 additions and 39 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,13 @@
bin/ bin/com
bin/test
bin/test-reports
bin/PropertyList-1.0.dtd
release release
.DS_Store .DS_Store
lib/jruby-complete-1.3.1.jar lib/jruby-complete-1.3.1.jar
release/ release/
tmp/ tmp/
lib/swt_jars
lib/jface_jars
.redcar
*.gem
34 changes: 34 additions & 0 deletions LICENSE
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,34 @@

### Licenses for specific files

jarjar-1.0.jar is distributed under the Apache License, version 2. For more details, see http://www.apache.org/licenses/LICENSE-2.0

junit-4.7.jar is distributed under the Common Public License - v 1.0. For more details, see https://github.com/KentBeck/junit/blob/master/LICENSE

### All other files

Unless specified in the file itself, the contents of all other files in this
repository are provided to you under the following license (MIT):

Copyright (c) Daniel Lucraft 2011.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


2 changes: 1 addition & 1 deletion README
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JavaMateView
Requirements Requirements
------------ ------------


* jruby-1.3.1 installed and set up on your path * > jruby-1.3.1 installed and set up on your path
* rspec gem installed via gem install rspec * rspec gem installed via gem install rspec
* make sure that JAVA_HOME points to a 1.6 type JDK (this is especially true on OSX Leopard) * make sure that JAVA_HOME points to a 1.6 type JDK (this is especially true on OSX Leopard)


Expand Down
28 changes: 26 additions & 2 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
@@ -1,8 +1,6 @@
require 'rake/clean' require 'rake/clean'
require 'net/http' require 'net/http'


JRUBY_VERSION = '1.3.1'

jruby_command = case Config::CONFIG["host_os"] jruby_command = case Config::CONFIG["host_os"]
when /darwin/i when /darwin/i
'jruby -J-XstartOnFirstThread ' 'jruby -J-XstartOnFirstThread '
Expand Down Expand Up @@ -48,6 +46,32 @@ end




namespace :build do namespace :build do
desc "Fetch the swt jars from the gem"
task :prepare do
require 'rubygems'
require 'java'
gem 'swt'
require 'swt/jar'
swt_jar_dir = File.dirname(Swt.jar_path)


mkdir_p File.expand_path("../lib/swt_jars", __FILE__)
%w(linux linux64 osx osx64 win32).each do |platform|
dir = File.expand_path("../lib/swt_jars/#{platform}", __FILE__)
mkdir_p dir
from = swt_jar_dir + "/swt_#{platform}.jar"
to = dir + "/swt.jar"
cp from, to
end

mkdir_p File.expand_path("../lib/jface_jars", __FILE__)

Dir[swt_jar_dir + "/jface/org.ecl*.jar"].each do |from, to|
to = File.expand_path("../lib/jface_jars/#{File.basename(from)}", __FILE__)
cp from, to
end
end

desc "Get jruby-complete to build release jar" desc "Get jruby-complete to build release jar"
task :get_jruby do task :get_jruby do
jruby_complete = "jruby-complete-#{JRUBY_VERSION}.jar" jruby_complete = "jruby-complete-#{JRUBY_VERSION}.jar"
Expand Down
File renamed without changes.
18 changes: 12 additions & 6 deletions build.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -40,19 +40,27 @@
</and> </and>
</condition> </condition>


<condition property="platform" value="windows"> <condition property="platform" value="win32">
<os family="windows" /> <os family="windows" />
</condition> </condition>


<path id="project.classpath"> <path id="project.classpath">
<pathelement location="${build.prod.dir}" /> <pathelement location="${build.prod.dir}" />
<pathelement location="${build.test.dir}" /> <pathelement location="${build.test.dir}" />


<fileset dir="${lib.dir}"> <fileset dir="${lib.dir}/">
<include name="*.jar" /> <include name="*.jar" />
</fileset> </fileset>


<fileset dir="${lib.dir}/${platform}"> <fileset dir="${lib.dir}/javamateview">
<include name="*.jar" />
</fileset>

<fileset dir="${lib.dir}/jface_jars">
<include name="*.jar" />
</fileset>

<fileset dir="${lib.dir}/swt_jars/${platform}">
<include name="*.jar" /> <include name="*.jar" />
</fileset> </fileset>
</path> </path>
Expand Down Expand Up @@ -82,9 +90,7 @@


<target name="jar" depends="compile"> <target name="jar" depends="compile">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="project.classpath" /> <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="project.classpath" />
<delete dir="release"/> <jarjar destfile="lib/javamateview/jar/java-mateview.jar" basedir="${build.prod.dir}">
<mkdir dir="release"/>
<jarjar destfile="release/java-mateview.jar" basedir="${build.prod.dir}">
<manifest> <manifest>
<attribute name="Built-By" value="${user.name}" /> <attribute name="Built-By" value="${user.name}" />
<attribute name="Class-Path" value=". lib vendor" /> <attribute name="Class-Path" value=". lib vendor" />
Expand Down
6 changes: 6 additions & 0 deletions lib/java-mateview.rb → lib/javamateview.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,10 @@


require 'javamateview/joni'
require 'javamateview/jcodings'
require 'javamateview/jdom'

require 'javamateview/jar/java-mateview'

module JavaMateView module JavaMateView
import com.redcareditor.mate.Bundle import com.redcareditor.mate.Bundle
import com.redcareditor.mate.Grammar import com.redcareditor.mate.Grammar
Expand Down
File renamed without changes.
Binary file added lib/javamateview/jar/java-mateview.jar
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed lib/linux/swt.jar
Binary file not shown.
Binary file removed lib/linux64/swt.jar
Binary file not shown.
Binary file removed lib/org.eclipse.core.commands.jar
Binary file not shown.
Binary file removed lib/org.eclipse.core.jobs_3.4.100.v20090429-1800.jar
Binary file not shown.
Binary file removed lib/org.eclipse.core.resources.jar
Binary file not shown.
Binary file not shown.
Binary file removed lib/org.eclipse.core.runtime_3.5.0.v20090525.jar
Binary file not shown.
Binary file removed lib/org.eclipse.equinox.common.jar
Binary file not shown.
Binary file not shown.
Binary file removed lib/org.eclipse.jface.jar
Binary file not shown.
Binary file removed lib/org.eclipse.jface.text_3.5.0.jar
Binary file not shown.
Binary file removed lib/org.eclipse.osgi.jar
Binary file not shown.
Binary file removed lib/org.eclipse.text_3.5.0.v20090513-2000.jar
Binary file not shown.
Binary file removed lib/osx/swt.jar
Binary file not shown.
Binary file removed lib/osx64/swt.jar
Binary file not shown.
29 changes: 0 additions & 29 deletions lib/swt_wrapper.rb

This file was deleted.

Binary file removed lib/windows/swt.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions redcar-javamateview.gemspec
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,18 @@

Gem::Specification.new do |s|
s.name = "redcar-javamateview"
s.version = "0.1"
s.platform = "java"
s.authors = ["Daniel Lucraft"]
s.email = ["dan@fluentradical.com"]
s.homepage = "http://github.com/danlucraft/redcar-javamateview"
s.summary = "A source editing widget for SWT that understands Textmate syntaxes and themes"
s.description = ""

s.files = Dir.glob("lib/javamateview/**/*") + %w(LICENSE README Rakefile lib/javamateview.rb) +
Dir.glob("test/**/*") + Dir.glob("spec/**/*") + Dir.glob("src/**/*")
s.executables = []
s.require_path = 'lib'

s.add_dependency("swt")
end

0 comments on commit 0759843

Please sign in to comment.