Code Monkey home page Code Monkey logo

resourceplaceholdersplugin's People

Contributors

timfreiheit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

resourceplaceholdersplugin's Issues

The plugin does not seem to support custom Manifest variables

Using ${applicationId} works fine, but when I define my own variables like

android {
...
        buildTypes.all {
            manifestPlaceholders = [exportDebugFeatures: "$debuggable"]
        }
}

And use it in my shortcuts.xml:

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
    <shortcut
        android:shortcutId="debugActivity"
        android:enabled="${exportDebugFeatures}"
        android:icon="@drawable/ic_debug"
        android:shortcutShortLabel="@string/app_shortcut_debug">
        <intent
            android:action="android.intent.action.VIEW"
             android:targetPackage="${applicationId}"
            android:targetClass="com.rise.app.wallet.debug.DebugActivity" />
        <!-- If your shortcut is associated with multiple intents, include them
             here. The last intent in the list determines what the user sees when
             they launch this shortcut. -->
        <categories android:name="android.shortcut.conversation" />
    </shortcut>
    <!-- Specify more shortcuts here. -->
</shortcuts>

build.gradle

resourcePlaceholders {
    files = ['xml/shortcuts.xml']
}

It wont't get resolved

AGPBI: {"kind":"error","text":"error: \u0027${exportDebugFeatures}\u0027 is incompatible with attribute android:enabled (attr) boolean.","sources":[{"file":"...\\app\\build\\generated\\res\\resourcesPlaceholders\\....\\debug\\xml\\shortcuts.xml"}],"original":"","tool":"AAPT"}
..\app\build\generated\res\resourcesPlaceholders\...\debug\xml\shortcuts.xml:0: error: '${exportDebugFeatures}' is incompatible with attribute android:enabled (attr) boolean.
error: failed linking file resources.

Add full example in Readme

Right now the user has to guess how it works in details. Provide a full minimal example on how to use it (like in your SO answer) e.g.

<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
    ...>

    <intent
        android:action="android.intent.action.VIEW"
        android:targetClass="com.test.MainActivity"
        android:targetPackage="${applicationId}"/>
</shortcut>

Not working on AGP 8.0.0.

Hi, after upgrading AGP from 7.4.1 to 8.0.0 I'm getting this error:

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
   > Could not create task ':app:resourcePlaceholdersForProductionGoogleDebug'.
      > Cannot use @TaskAction annotation on method ResourcePlaceholdersTask.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
   > Could not set unknown property 'enabled' for Report xml of type org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport.

Relevant part of the stacktrace:

	at de.timfreiheit.plugin.resourceplaceholders.ResourcePlaceholdersPlugin.configureAndroid(ResourcePlaceholdersPlugin.kt:82)
	at de.timfreiheit.plugin.resourceplaceholders.ResourcePlaceholdersPlugin.access$configureAndroid(ResourcePlaceholdersPlugin.kt:17)
	at de.timfreiheit.plugin.resourceplaceholders.ResourcePlaceholdersPlugin$configure$1.execute(ResourcePlaceholdersPlugin.kt:57)

Warning from gradle about disabled optimisations

Hi,

Thanks for creating this plugin!

I have recently been seeing the below warnings from gradle. I think they started after upgrading to Gradle 7.0, and they are still visible with Gradle 7.2.

Doesn't affect any functionality, but might be good to address the warnings.

> Task :app:extractDeepLinksAppNameRelease
Execution optimizations have been disabled for task ':app:extractDeepLinksAppNameRelease' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'app/build/generated/res/resourcesPlaceholders/AppName/release/navigation'. Reason: Task ':app:extractDeepLinksAppNameRelease' uses this output of task ':app:resourcePlaceholdersForAppNameRelease' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.


Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

Support for AGP 7.3.0+

Hi @timfreiheit !

First of all, thank you for great work here. We're using this plugin on @adidas to help us with multi-flavor projects.

Today I was facing a problem in one of our builds and I manage to understand that replacement of placeholders isn't working anymore.
From google issuetracker I see the APIs have change and this project needs to be update. I see that you activity are null since 2021, do you still supporting the project?

You can find more details here.

Thanks in advance.

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.