-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Use jar library instead of java files"
This reverts commit a197915.
- Loading branch information
1 parent
cc448be
commit d575f5f
Showing
38 changed files
with
5,393 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
plugins { | ||
id("java-library") | ||
id("org.jetbrains.kotlin.jvm") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2007-2009 Mihai Preda. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.javia.arity; | ||
|
||
/** | ||
* Thrown when a {@link Function} is evaluated with a wrong number of arguments | ||
* (when the number of arguments is not equal to the function's arity). | ||
*/ | ||
|
||
public class ArityException extends RuntimeException { | ||
public ArityException(String mes) { | ||
super(mes); | ||
} | ||
|
||
public ArityException(int nArgs) { | ||
this("Didn't expect " + nArgs + " arguments"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (C) 2008-2009 Mihai Preda. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.javia.arity; | ||
|
||
class ByteStack { | ||
private byte[] data = new byte[8]; | ||
private int size = 0; | ||
|
||
void clear() { | ||
size = 0; | ||
} | ||
|
||
void push(byte b) { | ||
if (size >= data.length) { | ||
byte[] newData = new byte[data.length << 1]; | ||
System.arraycopy(data, 0, newData, 0, data.length); | ||
data = newData; | ||
} | ||
data[size++] = b; | ||
} | ||
|
||
/* | ||
void pop(int cnt) { | ||
size -= cnt; | ||
} | ||
*/ | ||
|
||
byte pop() { | ||
return data[--size]; | ||
} | ||
|
||
byte[] toArray() { | ||
byte[] trimmed = new byte[size]; | ||
System.arraycopy(data, 0, trimmed, 0, size); | ||
return trimmed; | ||
} | ||
} |
Oops, something went wrong.
d575f5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you revert it? The library is much faster to build and compile for me...
d575f5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F-droid doesn't allow precompiled jar files
d575f5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dann :/