Permalink
Browse files

Gemified.

  * 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...
1 parent c9ccc5e commit 0759843648898a139fd26723be56f3fd1f0911b3 @danlucraft danlucraft committed Jun 12, 2011
View
@@ -1,6 +1,13 @@
-bin/
+bin/com
+bin/test
+bin/test-reports
+bin/PropertyList-1.0.dtd
release
.DS_Store
lib/jruby-complete-1.3.1.jar
release/
tmp/
+lib/swt_jars
+lib/jface_jars
+.redcar
+*.gem
View
34 LICENSE
@@ -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.
+
+
View
2 README
@@ -5,7 +5,7 @@ JavaMateView
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
* make sure that JAVA_HOME points to a 1.6 type JDK (this is especially true on OSX Leopard)
View
@@ -1,8 +1,6 @@
require 'rake/clean'
require 'net/http'
-JRUBY_VERSION = '1.3.1'
-
jruby_command = case Config::CONFIG["host_os"]
when /darwin/i
'jruby -J-XstartOnFirstThread '
@@ -48,6 +46,32 @@ end
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"
task :get_jruby do
jruby_complete = "jruby-complete-#{JRUBY_VERSION}.jar"
File renamed without changes.
View
@@ -40,19 +40,27 @@
</and>
</condition>
- <condition property="platform" value="windows">
+ <condition property="platform" value="win32">
<os family="windows" />
</condition>
<path id="project.classpath">
<pathelement location="${build.prod.dir}" />
<pathelement location="${build.test.dir}" />
- <fileset dir="${lib.dir}">
+ <fileset dir="${lib.dir}/">
<include name="*.jar" />
</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" />
</fileset>
</path>
@@ -82,9 +90,7 @@
<target name="jar" depends="compile">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="project.classpath" />
- <delete dir="release"/>
- <mkdir dir="release"/>
- <jarjar destfile="release/java-mateview.jar" basedir="${build.prod.dir}">
+ <jarjar destfile="lib/javamateview/jar/java-mateview.jar" basedir="${build.prod.dir}">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Class-Path" value=". lib vendor" />
@@ -1,4 +1,10 @@
+require 'javamateview/joni'
+require 'javamateview/jcodings'
+require 'javamateview/jdom'
+
+require 'javamateview/jar/java-mateview'
+
module JavaMateView
import com.redcareditor.mate.Bundle
import com.redcareditor.mate.Grammar
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -1,29 +0,0 @@
-
-
-module Swt
- import org.eclipse.swt.SWT
-
- module Widgets
- import org.eclipse.swt.widgets.Display
- import org.eclipse.swt.widgets.Shell
- import org.eclipse.swt.widgets.Composite
- import org.eclipse.swt.widgets.Menu
- import org.eclipse.swt.widgets.MenuItem
- end
-
- module Layout
- import org.eclipse.swt.layout.FillLayout
- end
-
- module Graphics
- import org.eclipse.swt.graphics.Font
- import org.eclipse.swt.graphics.Point
- import org.eclipse.swt.graphics.RGB
- end
-end
-
-module Jface
- import org.eclipse.jface.action.Action
- import org.eclipse.jface.action.MenuManager
- import org.eclipse.jface.window.ApplicationWindow
-end
View
Binary file not shown.
@@ -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.