Skip to content

Commit 7b1ecba

Browse files
author
infeo
committed
Merge branch 'release/1.1.0'
2 parents fe13696 + a6aad3f commit 7b1ecba

File tree

76 files changed

+2501
-1470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2501
-1470
lines changed

.idea/codeStyles/Project.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,61 @@
1-
Dokany-Java
1+
Dokan-Java
22
======
3-
4-
# Important Notice
5-
This project has switched to a new architecture. The _old_ dokan-java can be found under the deprecated branch and will be deleted after 6 months.
6-
73
## Introduction
8-
Dokany-Java is a Java wrapper for [Dokany 1.x release](https://github.com/dokan-dev/dokany/releases) and above.
4+
Dokan-Java is a Java wrapper for [Dokany 1.x releases](https://github.com/dokan-dev/dokany/releases) and above. Using this project you are able to implement your own filesystem on Windows... in Java!
5+
6+
[Dokany](https://github.com/dokan-dev/dokany) is a device driver providing an interface to develop and run your own filesystem on Windows (similar to [FUSE](https://github.com/libfuse/libfuse)). Its native bindings are written in C/C++, this library provides via JNA a Java interface to its API with additional convenience methods.
97

108
## Runtime Dependencies
119
- [Java JRE 11](https://jdk.java.net/11/)
1210

13-
All dependencies can be seen [here](build.gradle).
11+
All dependencies can be seen in the dependecies section of [the build file](build.gradle). The following are the primary dependencies:
1412

1513
- [JNA](https://github.com/java-native-access/jna) - provides access to [native Dokany functions](https://dokan-dev.github.io/dokany-doc/html/struct_d_o_k_a_n___o_p_e_r_a_t_i_o_n_s.html)
1614
- [Commons IO](https://commons.apache.org/proper/commons-io/)
17-
- [SLF4J](https://www.slf4j.org/)
1815
- [Guava](https://github.com/google/guava)
1916
- [JUnit 5](https://junit.org/junit5/)
17+
18+
## How to Use
19+
There are 2 ways to directly use dokan-java:
20+
1. Use a pre-built version
21+
2. Build it yourself
22+
23+
### Pre-Built Version
24+
The first stable release can be found here: https://bintray.com/infeo/maven/dokan-java
25+
26+
To use dokan-java in maven or gradle projects, you have to add jcenter as a repository and then find it under the following coordinates:
27+
* Maven
28+
```xml
29+
<dependency>
30+
<groupId>dev.dokan</groupId>
31+
<artifactId>dokan_java</artifactId>
32+
<version>1.1.0</version>
33+
</dependency>
34+
```
35+
* Gradle
36+
```groovy
37+
dependencies {
38+
implementation (group:'dev.dokan', name:'dokan_java', version:'1.1.0')
39+
}
40+
```
41+
42+
A publication to [MavenCentral](https://repo.maven.apache.org/maven2/) is in progress.
2043

21-
## How to Build
22-
TODO
44+
### Build Instructions
45+
Prerequisite: [JDK 11](https://jdk.java.net/11/)
46+
47+
Building a jar using [Gradle](https://gradle.org/):
48+
1. Open Terminal
49+
2. Navigate to the root folder of the project
50+
3. Execute `./gradlew.bat jar`
51+
52+
To publish to a local Maven repository, execute as the third step `./gradlew.bat publishToMavenLocal`
53+
54+
## Examples
55+
Example user filesystems using this library, see the examples package [dev.dokan.dokan_java.examples](https://github.com/dokan-dev/dokan-java/tree/develop/src/main/java/dev/dokan/dokan_java/examples).
56+
57+
## Contributing
58+
You're encouraged to contribute. Fork the code and then submit a pull request.
2359

24-
## Development Examples
25-
For an example on how to develop using this library, see the examples package [com.dokan.java.examples](https://github.com/dokan-dev/dokan-java/tree/develop/src/main/java/com/dokan/java/examples).
60+
## License
61+
This library is licensed under [GNU LGPLv3](LICENSE).

build.gradle

Lines changed: 59 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* This file was generated by the Gradle 'init' task.
33
*
44
* It describes how to build the dokan-java project.
5-
* In order to be able to build then library one must define the gradle properties "bintrayUser" and "bintrayApiKey" in your ~/.gradle/gradle.properties file with some random values
65
*
76
* To publish to the local Maven repository, execute 'gradle publishToMavenLocal'
87
*/
@@ -14,6 +13,7 @@ plugins {
1413
id 'com.jfrog.bintray' version '1.8.4'
1514
}
1615

16+
1717
dependencies {
1818
implementation (group:'com.google.guava', name:'guava', version:guavaVersion)
1919
implementation (group:'net.java.dev.jna', name:'jna', version:jnaVersion)
@@ -23,9 +23,9 @@ dependencies {
2323
api (group:'org.slf4j', name:'slf4j-api', version:slf4jVersion) //is this correct or should it be implementation?
2424

2525
testImplementation (group:'org.slf4j', name:'slf4j-simple', version:'1.7.25')
26-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
26+
testImplementation (group:'org.junit.jupiter', name:'junit-jupiter-api', version:'5.3.1')
2727

28-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
28+
testRuntimeOnly (group:'org.junit.jupiter', name:'junit-jupiter-engine', version:'5.3.1')
2929
}
3030

3131
// In this section you declare where to find the dependencies of your project
@@ -34,10 +34,23 @@ repositories {
3434
jcenter()
3535
}
3636

37+
//Check if the bintray credentials are defined, otherwise set them to dummy values
38+
ext {
39+
if(project.hasProperty('bintrayUsername')){
40+
bintrayUser = bintrayUsername
41+
} else {
42+
bintrayUser = 'NOT DEFINED'
43+
}
44+
if(project.hasProperty('bintrayApiKey')){
45+
bintrayKey = bintrayApiKey
46+
} else {
47+
bintrayKey = 'NOT DEFINED'
48+
}
49+
}
3750

3851
bintray{
3952
user = bintrayUser
40-
key = bintrayApiKey
53+
key = bintrayKey
4154
publications = ['release']
4255
pkg {
4356
version {
@@ -47,13 +60,13 @@ bintray{
4760
vcsTag = project.version
4861
gpg {
4962
sign = true
63+
passphrase = System.getenv("PWD")
5064
}
5165
}
5266
repo = 'maven'
5367
name = project.name
5468
licenses = ['LGPL-3.0']
5569
vcsUrl = scmUrl
56-
5770
}
5871
}
5972

@@ -72,11 +85,19 @@ task javadocJar(type: Jar) {
7285
}
7386

7487
task showBintrayInfo() {
75-
description 'Shows your system bintray credentials'
88+
description 'Shows your system bintray credentials, if defined, otherwise NOT DEFINED '
7689
group 'bintray'
7790
doLast() {
7891
println bintrayUser
79-
print bintrayApiKey
92+
print bintrayKey
93+
}
94+
}
95+
96+
task showProjectInfo(){
97+
doLast() {
98+
println project.name
99+
println project.version
100+
println project.description
80101
}
81102
}
82103

@@ -86,50 +107,51 @@ tasks {
86107
attributes(
87108
'Implementation-Title': project.name,
88109
'Implementation-Version': project.version,
89-
'Specification-Title': 'Java Wrapper for Dokany',
110+
'Specification-Title': project.description,
90111
'Specification-Version': project.version,
91112
)
92113
}
93114
}
94115
}
95116

96-
def pomConfig = {
97-
licenses {
98-
license {
99-
name licenseName
100-
url licenseUrl
101-
distribution "repo"
102-
}
103-
}
104-
105-
developers {
106-
developer {
107-
id maintainerId
108-
name maintainer
109-
email maintainerMail
110-
timezone '+1'
111-
}
112-
}
113-
114-
scm {
115-
url scmUrl
116-
}
117-
}
118-
119117
publishing {
120118
publications {
121119
release(MavenPublication) {
122120
from components.java
123121
groupId group
122+
artifactId artifact
124123
artifact sourcesJar
125124
artifact javadocJar
126-
pom.withXml {
127-
def root = asNode()
128-
root.appendNode('description', project.description)
129-
root.appendNode('name', project.name)
130-
root.appendNode('url', scmUrl)
131-
root.children().last() + pomConfig
125+
pom {
126+
name = project.name
127+
description = project.description
128+
url = scmUrl
129+
licenses {
130+
license {
131+
name = licenseName
132+
url = licenseUrl
133+
distribution = "repo"
134+
}
135+
}
136+
developers {
137+
developer {
138+
id = maintainerId
139+
name = maintainer
140+
email = maintainerMail
141+
timezone = '+1'
142+
}
143+
}
144+
scm {
145+
connection = 'scm:git:git://github.com/dokan-dev/dokan-java.git'
146+
url = scmUrl
147+
}
132148
}
133149
}
134150
}
135151
}
152+
153+
javadoc {
154+
if(JavaVersion.current().isJava9Compatible()) {
155+
options.addBooleanOption('html5', true)
156+
}
157+
}

dokan-java.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id="dokan-java" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.dokan" external.system.module.version="1.0.0-SNAPSHOT" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id="dokan-java" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="dev.dokan" external.system.module.version="1.1.0-SNAPSHOT" type="JAVA_MODULE" version="4">
33
<component name="NewModuleRootManager" inherit-compiler-output="true">
44
<exclude-output />
55
<content url="file://$MODULE_DIR$">

gradle.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
version=1.0.0
2-
group=com.dokan
1+
name=dokan-java
2+
version=1.1.0
3+
group=dev.dokan
4+
artifact=dokan_java
35
description=A Java wrapper for Dokany (https://dokan-dev.github.io/)
46

57
scmUrl=https://github.com/dokan-dev/dokan-java
@@ -14,7 +16,7 @@ licenseName=GNU Lesser General Public License, Version 3.0
1416
licenseUrl=https://www.gnu.org/licenses/lgpl-3.0.en.html
1517

1618
#lib versions
17-
jnaVersion=5.0.0
19+
jnaVersion=5.4.0
1820
guavaVersion=27.0-jre
1921
slf4jVersion=1.7.25
2022
apacheCommonsIOVersion=2.6

gradle/wrapper/gradle-wrapper.jar

-125 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
109125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110126
fi
111127

112-
# For Cygwin, switch paths to Windows format before running java
113-
if $cygwin ; then
128+
# For Cygwin or MSYS, switch paths to Windows format before running java
129+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
114130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116132
JAVACMD=`cygpath --unix "$JAVACMD"`

gradlew.bat

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS="-Xmx64m"
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

0 commit comments

Comments
 (0)