Giter Site home page Giter Site logo

Comments (21)

efraespada avatar efraespada commented on May 18, 2024

@d-moreira it should work in different OS. Could you find the res folder on your project?

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hi @efraespada,

yes I can. The project is version controlled here on GitHub so the code is exactly the same on both machines. I'm thinking this issue may be related with some sort of setting, or something that is affecting the way the plugin finds the paths to the files... Do you have any idea?

On the same machine, on version 0.4.1, I couldn't use the plugin either. There was some error
when the plugin tried to run the AndroidStringObfuscator.jar file. This is the log:

FAILURE: Build failed with an exception.

* Where:
Build file 'path_to_project/android-app/app/build.gradle' line: 178

* What went wrong:
Execution failed for task ':app:mergeDevelopmentDebugResources'.
> Process 'command '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Hope this can help you track the issue.

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira could it be a problem with Java? Type java -version on terminal, are you getting anything like this?

$ java -version
java version "1.8.0_152"

If it is not a Java problem, run this:

./gradlew lint --stacktrace

Tell me what you receive.

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

These are the logs on a machine with the problem and on a machine where everything is working.

failure.txt
success.txt

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira I can't see the problem 😅
Don't worry. I'll build a new version with a debug flag to print everything related with resources folder. Thanks for your patient.

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hello @efraespada, any news on this?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

Happy new year @d-moreira, last weeks I was on other project, so this was stopped but I kept it in mind. Did you try to clone the repo and open it with Android Studio?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira I just released a new version, 0.3. 🤞🏼
Note now for apply plugin you must use:

apply plugin: StringCare

Readme is updated.

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hi @efraespada,

sorry for the delayed reply but I have limited access to the machine with problems. I tested the new release and it is still not working.

I run a build with debug=true and the only useful info that I can see is that it is not finding the folder with the strings:

:app:backupStringResources
    source folder not found: src/main
:app:encryptStringResources
    source folder not found: src/main
:app:restoreStringResources
    restore folder not found

Any idea on what's happening and how to fix it?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira you must use debug right this way:

stringcare {
    debug true
}

It should confirm your release signing config is defined.

........................................................................................................................................................

I found a bug that didn't allow the plugin to look for the right module. It should be fixed 🤔

Check if both soft (library and plugin) are the latest version -> 0.3

Use (on Android Studio) File -> Invalidate Caches / Restart... and sync Gradle.

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

I'm doing that and using the correct software versions. I have something like:

stringcare {
    debug true
    modules {
        app {
            stringFiles = ['secrets.xml']
            srcFolders = ['src/main']
        }
    }
}

But the plugin can't find the src/main folder when I run the project on one particular pc. If I run the same exact project on another pc it works as intended. It seems the issue is related to some kind of setting of the pc.

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

It should work in all PCs 💪
Let's print WTF is looking for

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira new version -> 0.4

  • More logs with debug true
  • Some bugfixes 🤞

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hi @efraespada, this is still not working :( (thank you for your effort still!). I managed to get some info from the logs that should be useful:

:app:backupStringResources
    source folder not found: path_to_project/src/main/res/
:app:backupStringResources
	- values/secrets.xml
	backuping file: path_to_project/app/src/main/res/values/secrets.xml

The first log is from the faulty build and the second from a correct build on another machine. We can see that the plugin is trying to find the folder on the wrong path, on the first one. It should look on path_to_project/app/src/main/res/ (so the module name is not being taken into consideration).

Can you look into this?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

🤣 🤣 incredible, I can't imagine where is the difference between both PCs for missing module name, but I'm sure It isn't a PC fault.
@d-moreira you are on the right thing. I'll review code again.
Thanks!

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira check out version 0.5

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hi @efraespada, the problem persists:

:app:mergeTestDebugResources
    Module: app
    Variant: testDebug
    Store: .../.android/debug.keystore
    SHA1: ...
    Valid until: Saturday, June 10, 2045
:app:backupStringResources
    source folder not found: path_to_app/src/main/res/

It seems to recognize the module name but it does not get added to the res folder path.

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hi @efraespada, any news on this?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

@d-moreira check out version 0.6 on plugin:
classpath "com.stringcare:plugin:0.6"🤞🏼

from androidlibrary.

d-moreira avatar d-moreira commented on May 18, 2024

Hey @efraespada, it's finally working :) thank you for your persistence!

Can you take a look at #25 and release a new version with all these changes?

from androidlibrary.

efraespada avatar efraespada commented on May 18, 2024

#25 merged 👌 building version 0.6 on library.
Thank you again @d-moreira!!!

from androidlibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.