Skip to content

Commit

Permalink
Merge pull request #528 from lwahonen/automate_ideajar
Browse files Browse the repository at this point in the history
Automate building of idea jar
  • Loading branch information
twall committed Dec 4, 2015
2 parents 900a33c + 40dcd21 commit 97978a0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Features
* [#512](https://github.com/java-native-access/jna/pull/512): Make loading debug flags mutable [@lwahonen](https://github.com/lwahonen).
* [#514](https://github.com/java-native-access/jna/pull/514): Added `host_processor_info` to `com.sun.jna.platform.mac.SystemB` - [@dbwiddis](https://github.com/dbwiddis).
* [#519](https://github.com/java-native-access/jna/pull/519): Added JNA functional overview - [@twall](https://github.com/twall).
* [#528](https://github.com/java-native-access/jna/pull/528): Added idea-jar ant task that creates a convenience jar that contains all native dispatch libraries - [@lwahonen](https://github.com/lwahonen).

Bug Fixes
---------
Expand Down
6 changes: 6 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,12 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
</subant>
</target>

<target name="idea-jar" depends="jar" description="Build Intellij Idea convenience jar">
<jar destfile="${dist}/idea-dispatch.jar">
<zipfileset src="${dist-jar}" excludes="**/*.class"/>
</jar>
</target>

<target name="javah" depends="compile" unless="-native">
<javah classpath="${classes}" destdir="${build.native}" force="yes">
<class name="com.sun.jna.Function"/>
Expand Down
9 changes: 9 additions & 0 deletions www/DevelopInIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Hacking on JNA with IntelliJ IDEA
======================================

The idea-jar target generates a jar that contains all the native bits needed by JNA.

Create a new module for JNA in Idea, mark the src folder as sources, testsrc as test sources.
Add a library to the module, include all jars from lib, lib/test and the idea-dispatch.jar generated by aforementioned ant target.

After this, you should be able to use JNA in your own code via this module, instead of including a JNA jar. This also speeds up development quite considerably, as you don't need to rebuild JNA jar between code changes.

0 comments on commit 97978a0

Please sign in to comment.