Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port ant build system to gradle #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

desyncr
Copy link

@desyncr desyncr commented Aug 29, 2020

  • Maven project structure
  • Android release compilation complains about 'res' reserved keyword
  • Remove unused artifacts
  • Add verification hashes for gradle witness

@desyncr desyncr marked this pull request as draft August 29, 2020 17:41
@desyncr desyncr marked this pull request as ready for review August 29, 2020 18:38
build.gradle Outdated Show resolved Hide resolved
@desyncr
Copy link
Author

desyncr commented Sep 1, 2020

Updated target and source compatibility to java 8. Also added gradle witness verification and distribution integrity verification.

@desyncr desyncr marked this pull request as draft January 29, 2021 21:46
@desyncr desyncr marked this pull request as ready for review March 6, 2021 16:34
@desyncr
Copy link
Author

desyncr commented Mar 6, 2021

@ArneBab @JanGerritsen Ready for review. It may seem a lot but there's mostly changes on this commit: abbe6d2
Where the Gradle project structure is put on place. Removing some copied-over libraries and converting them to dependencies.

@desyncr
Copy link
Author

desyncr commented Mar 15, 2021

Any news on the review? @ArneBab

@ArneBab
Copy link

ArneBab commented Oct 17, 2021

I’m sorry that it took me until now. The changes look good to me. Given that Textile-J 2.2 is unmaintained, we might want to keep in bundled, though. We already have two fixes in it — can we get those in with the bundled textile J?

commit b5b79fa46a64d4df4371858f5371e1f7c1e4693b
Author: drak@kaverne <drak@kaverne>
Date:   Tue Mar 28 22:31:59 2017 +0200

    add missing checks for null values

diff --git a/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java b/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java
index 141cd93..2602a7a 100644
--- a/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java
+++ b/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java
@@ -51,7 +51,7 @@ public class SimpleTextilePhraseModifier extends PatternBasedElement {
                String quotedDelimiter = quoteLite(getDelimiter());
 
                // special casing to avoid breaking freenet keys:
-               if (this.delimiter == "-") {
+               if ((this.delimiter != null) && (this.delimiter.equals("-"))) {
                        return
                                  "(?<!(?i:CHK|SSK|USK|KSK)@[\\S]{0,1000})" + quotedDelimiter + "(?!"+quotedDelimiter+")"+
                                  Textile.REGEX_ATTRIBUTES +

and

diff --git a/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java b/src/net/java/textilej/pa
rser/markup/textile/phrase/SimpleTextilePhraseModifier.java
index eca1f61..141cd93 100644
--- a/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java
+++ b/src/net/java/textilej/parser/markup/textile/phrase/SimpleTextilePhraseModifier.java
@@ -49,7 +49,15 @@ public class SimpleTextilePhraseModifier extends PatternBasedElement {
        @Override
        protected String getPattern(int groupOffset) {
                String quotedDelimiter = quoteLite(getDelimiter());
-               
+
+               // special casing to avoid breaking freenet keys:
+               if (this.delimiter == "-") {
+                       return
+                                 "(?<!(?i:CHK|SSK|USK|KSK)@[\\S]{0,1000})" + quotedDelimiter + "(?!"+quotedDelimiter+")"+
+                                 Textile.REGEX_ATTRIBUTES +
+                                 "([^\\s"+quotedDelimiter+"]+|\\S[^"+quotedDelimiter+"]*[^\\s"+quotedDelimiter+"])" + // c
ontent
+                                 quotedDelimiter;
+                       }
                return 
                quotedDelimiter + "(?!"+quotedDelimiter+")"+
                Textile.REGEX_ATTRIBUTES +

@desyncr
Copy link
Author

desyncr commented Oct 17, 2021

Sure, I'll apply these changes shortly.

@ArneBab
Copy link

ArneBab commented Oct 23, 2021

Thank you! Please also check whether the plugin when built from gradle and inserted to CHK can be loaded and works.

@ArneBab
Copy link

ArneBab commented Jan 22, 2022

@desyncr did you apply the changes to upstream? Are they released? Do we need to change the version of the dependency?

@desyncr
Copy link
Author

desyncr commented Jan 23, 2022

@ArneBab No sorry. I was a bit unsure about re-adding textile and how to do it in Gradle. It's gonna take a bit longer to be ready. I think it's not blocking anything, right?

@ArneBab
Copy link

ArneBab commented Jan 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants