Permalink
Browse files

* Bumped version to 1.0.0.RC10

* Issue #14 Failed at 'rake jar'
* Issue #15 RC9: NPE in SQLDroidConnection.finalize on Android 2.3.7
  • Loading branch information...
1 parent e3929a0 commit c51103c962b861cf7ab338e08ab0011d7138bd33 @donv donv committed Mar 24, 2013
Showing with 13 additions and 4 deletions.
  1. +10 −2 Rakefile
  2. +1 −1 lib/sqldroid/version.rb
  3. +2 −1 src/org/sqldroid/SQLDroidConnection.java
View
@@ -2,7 +2,13 @@ require 'fileutils'
require File.expand_path 'lib/sqldroid/version', File.dirname(__FILE__)
require 'rake/clean'
-ANDROID_SDK_HOME = File.dirname(File.dirname(`which dx`))
+if ENV['ANDROID_HOME']
+ ANDROID_SDK_HOME = ENV['ANDROID_HOME']
+else
+ dx_location = `which dx`
+ raise 'Unable to find ANDROID_HOME environment variable or the "dx" command.' unless $? == 0
+ ANDROID_SDK_HOME = File.dirname(File.dirname(dx_location))
+end
PKG_DIR = File.expand_path 'pkg'
JAR = "sqldroid-#{SQLDroid::VERSION}.jar"
JAR_IN_PKG = "#{PKG_DIR}/#{JAR}"
@@ -21,7 +27,9 @@ task :jar => JAR_IN_PKG
file JAR_IN_PKG => JAVA_SRC_FILES do
FileUtils.mkdir_p 'bin'
- sh "javac -source 1.6 -target 1.6 -bootclasspath #{ANDROID_SDK_HOME}/platforms/#{ANDROID_TARGET}/android.jar -d bin -sourcepath src src/*/*/*.java"
+ jar = "#{ANDROID_SDK_HOME}/platforms/#{ANDROID_TARGET}/android.jar"
+ raise "Expected '#{jar}' file missing." unless File.exists?(jar)
+ sh "javac -source 1.6 -target 1.6 -bootclasspath #{jar} -d bin -sourcepath src src/*/*/*.java"
FileUtils.mkdir_p PKG_DIR
Dir.chdir 'bin' do
sh "jar cf #{PKG_DIR}/#{JAR} org"
@@ -1,3 +1,3 @@
module SQLDroid
- VERSION = '1.0.0.RC9'
+ VERSION = '1.0.0.RC10'
end
@@ -273,7 +273,8 @@ public SQLWarning getWarnings() throws SQLException {
@Override
public boolean isClosed() throws SQLException {
// assuming that "isOpen" doesn't throw a locked exception..
- return sqlitedb.getSqliteDatabase() == null || !sqlitedb.getSqliteDatabase().isOpen();
+ return sqlitedb == null || sqlitedb.getSqliteDatabase() == null ||
+ !sqlitedb.getSqliteDatabase().isOpen();
}
@Override

0 comments on commit c51103c

Please sign in to comment.