Comments (7)
Obfuscating FXML files is not explicitly supported. However, if you only need to adjust class names, you can try adding
<adjust replacecontent="true">
<include name="**/*.fxml"/>
</adjust>
to the rename element of your yguard task. yGuard is not able to adjust method names that are specified as event handlers in FXML, though.
The other, more reliable option is to exclude class and method names that are used in FXML from obfuscation.
from yguard.
@yanchikdev did this fix your issue? Can it be closed?
@thomasbehr should we add a fxml
example to the examples
folder?
from yguard.
@Fohlen Yeah, I excluded the controller from obfuscation and it worked.
But I still wanted yGuard to be able to rename methods in FXML
from yguard.
@Fohlen As long as yGuard does not support obfuscating method names in FXML files, I do not think an example is the proper place for providing this kind of information. I would prefer to have this piece of information as part of the yGuard documentation.
from yguard.
Since yFiles
is also offered for JavaFX applications it probably makes sense to add this functionality to yGuard
to cover the use case. Moving up on our priority list.
from yguard.
@meetinger I've set up an example with FXML support. However there are two issues that currently need to be handled by hand:
- if you reference a method name from your FXML you need to exclude it from obfuscation
- if you use anonymous functions that actually have semantics (e.g
ActionEvent.handle
) you will need to exclude those from obfuscation as well
I think this is a well enough tradeoff for obfuscation. Most of our use cases do not require "reflecting" the method names from a config. In contrary this is probably not desired, as during deployment / obfuscation you want to be very explicit what gets mapped. Is this as you imagined it and could this issue be closed with it?
from yguard.
Closing this because of inactivity and because we see the current tradeoff as sufficient for most use cases.
from yguard.
Related Issues (20)
- Remove Kotlin Metadata annotations HOT 2
- <tasks> replaced by <target> HOT 4
- all method param after obscure are change like paramXXXX HOT 2
- Unique class name generation HOT 8
- The demo for example (/examples/resources/) is not valid. After the maven package is packaged, the package structure and resource contents of the jar file are not changed. HOT 2
- Fix replaceContentPolicy strict for package name strings
- Can we obfuscate spring boot war file ? HOT 8
- Keep method params HOT 4
- Combine obfuscation settings in pom.xml with Obfuscation annotation HOT 7
- How to generate pseudorandom name mappings for package, class HOT 3
- Can we do only Obfuscation step using yGuard ? HOT 1
- support multiple keep for multiple class HOT 4
- How to obfuscate .apk with this tool? HOT 1
- Issue with uber-jar obfuscation (Self-contained executable jar) HOT 1
- Excluding clojure HOT 3
- Exposed class is still being obfuscated HOT 1
- What are the limitations of yGuard tool ? HOT 4
- Yshrink does not accept the Record keyword HOT 2
- compileOnly - Task FAILED Unable to load class 'com.yworks.yguard.YGuardTask'. HOT 2
- spring boot web cannot be recognized after obfuscation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yguard.