Giter VIP home page Giter VIP logo

fastlane-plugin-versioning_android's People

Contributors

igorlamos avatar jamiesonbates avatar jgsheffer avatar koranda avatar luminouspath avatar thefabbiuscorp 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fastlane-plugin-versioning_android's Issues

android_set_version_name sets versionName to empty string

Fastfile

gradle_file = "./android/app/build.gradle"
android_set_version_name(
  gradle_file: gradle_file,
  bump_type: "patch"
)
version_name = android_get_version_name(gradle_file: gradle_file)
puts(version_name) # Returns an empy string

build.gradle

versionName ""

While android_set_version_code(gradle_file: gradle_file) works perfectly, no problem.

Why?

Is it possible to add flavour parameter for build.gradle with multiple app config?

Hi, could you add in your plugin a parameter in order to manager flavours?
Indeed, in case of our app, we have the same code to build two different apps and so have two flavours defined and for each a versionName and a versionCode value.

Moreover, I've tested your plugin and I don't understand how the bump_type parameter works since I must set a value for the version_name parameter. I thought that the bump_type will increment automatically the versionName value. Which values are expected for bump_type parameter?

Thanks a lot.

Cannot find the build.gradle and read value

Somehow it cannot find the build.gradle file...

------------------------------
--- Step: default_platform ---
------------------------------
Driving the lane 'android version' 🚀
--------------------------------------
--- Step: android_get_version_code ---
--------------------------------------
An exception occured while reading gradle file: No such file or directory @ rb_sysopen - /Users/<me>/Application/MyAoo/app/build.gradle

But when I take the exact path printed in the terminal, it's found...
Using fastlane 2.139.0

can't install v0.1.1

Could not find fastlane-plugin-versioning_android-0.1.1 in any of the sources.

The latest version is v0.1.0 on RubyGems

set_version_name does not work if there are spaces

I have found a bug in android_set_version_name.

If there is a space in the version name, for example:
"3.2.1 some word"

only the last set of characters after the last space are replaced. So if I were to try to set the version name to "3.2.2 another word" the actual version name in the gradle file will be:
"3.2.1 some 3.2.2 another word"

android_set_version_name does not work with Flutter

Using android_set_version_name without options sets versionName to an empty string. If you run it twice it then completely removes the property from gradle.

If you instead try setting a specific version (e.g. android_set_version_name(version_name: '1.0.0')) it sets an invalid raw numeric instead of a string

def flutterVersionName = 1.0.0 // Error's when building - invalid format
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

Exception occured while reading gradle file

An exception occured while reading gradle file: No such file or directory @ rb_sysopen

Following error occured when using android_get_version_code and android_get_version_name containing white space in provided gradle path.

E-g .
android_get_version_code(gradle_file: "MBFS/build.gradle") works fine.

android_get_version_code(gradle_file: "MBFS\ JP/build.gradle") exception occur.

not working in when using build.gradle.ktx

android_set_version_name Action not found file when used build.gradle.ktx ( kotlin script).

It is working in build.gradle. but build.gradle.ktx is not working.

Please handling branch ( ktx, groovy ) and apply.

android_set_version_code not work?

Before creating an apk file, I call android_set_version_code & android_set_version_name, but it seems that only android_set_version_name works. Before and after creating apk, I use to check android_get_version_code, but then I check the output.json file, in which buildCode: 1, and buildName: "8539".

5

app/build.gradle file after using plugin:
4

Problems with versionName and string interpolation

Hello,

I'm facing a problem when invoke android_get_version_name

Due my build.gradle has following structure:

android {

    def versionMajor = 6
    def versionMinor = 8
    def versionPatch = 27

    compileSdkVersion 30
    ....
    versionName "${versionMajor}.${versionMinor}.${versionPatch}"

Then android_get_version_name is returned ${versionMajor}.${versionMinor}.${versionPatch} instead of 6.8.27, I'm not sure if there's a problem with this plugin or do I have to change something from my side.

There's the fastlane step i have


platform :android do

  desc "Runs something fun"
  lane :doSomethingFun do
    gradle(task: "test")
    increment_version_code(
     gradle_file_path: “app/build.gradle”
    )
    versionName = android_get_version_name // <!-- here I'm getting `${versionMajor}.${versionMinor}.${versionPatch}`
    #gradle(task: "test")
  end

Errors related to `/tmp` folder inside Docker container. Why use of `Tempfile`?

I am being faced with the following error when running a Fastlane lane in a Docker container (based on debian:bullseye-slim):

/usr/lib/ruby/2.7.0/fileutils.rb:548:in `rename': Invalid cross-device link @ rb_file_s_rename - (/tmp/fastlaneIncrementVersionName20230307-13093-1g2hon7, ./android/app/build.gradle) (Errno::EXDEV)

/usr/lib/ruby/2.7.0/fileutils.rb:1424:in `utime': \e[31m[!] Operation not permitted @ apply2files - ./android/app/build.gradle\e[0m (Errno::EPERM)

Any specific reason this plugin uses a temporary file in the /tmp folder for making changes to the build.gradle instead of replacing directly in the original build.gradle file?

This seems like an unnecessary detour?

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.