42 Commits

Author SHA1 Message Date
Denis Oliveira
5629d6560e
Support newest Android Gradle Plugin (#512)
* Update gradle plugin and compliance on dotenv.gradle

* Update gradle plugin from example and minimum gradle support
2020-10-22 10:27:15 -03:00
booker-dragon
3ed79e4bb6
Fix flavor matching in dotenv.gradle (#381)
`getCurrentFlavor` is returning flavor in lower case but `loadDotEnv` just compare flavor with the key in `envConfigFiles` directly

Example:
If the flavor named as `tempRelease`, `getCurrentFlavor` will return `temprelease` and the comparison will be failed
2020-08-04 09:34:57 -03:00
Ben LaVerriere
d8073ed16d
Don't specify buildToolsVersion on Android (#477)
Since we're depending on a version of the Android Gradle plugin higher
than 3, we don't need to specify a buildToolsVersion. Trying to grab
this value from the root project, in a project that also doesn't specify
it, would fail. Since the only reason we were doing the fetch was to
specify our own buildToolsVersion, I think we can safely remove it.
2020-08-01 14:55:09 -03:00
luancurti
eb4b9c5eee
Revert "Added rudimentary system environment variable support. (#284)" (#470)
This reverts commit 7a8fd6253586540eee732989c00c0af6759fb82f.
2020-07-12 23:38:47 -03:00
Alex Barry
7a8fd62535
Added rudimentary system environment variable support. (#284) 2020-07-10 21:07:09 -03:00
sckoh
5ef07d1f4c
add support for android buildTypes or productFlavors name with numeric (#334)
Co-authored-by: sckoh <soocheng.koh@ifastfinancial.com>
2020-06-12 23:21:49 -03:00
Jafar Jabr
293a673cfe
Fix deprecation with gradle 4.0.1 (#459)
fix " No signature of method: com.android.build.gradle.internal.variant.ApplicationVariantData.getVariantConfiguration() is applicable for argument types: () values: []" with gradle 4.0.1
2020-06-01 23:21:45 -03:00
Volodymyr Matsola
7b188c16e7
[ios] App extensions support (#456)
* Add support of ios app extension

* Update documentation
2020-05-22 14:56:31 -03:00
SolutiLyon
74ae697443
using root properties for versions (latest rn) (#305)
Co-authored-by: bberthelemy <>
Co-authored-by: Luan Curti <luancurti@gmail.com>
2020-05-19 23:36:57 -03:00
lehug
63a751a34a change google() before jcenter() 2020-03-18 22:15:57 -03:00
tkow
da7aef3a88 always set default value instead of .env 2020-03-18 22:13:18 -03:00
Eric Kreutzer
0c671a5b42
Merge pull request #275 from Kabangi/master
Fix envConfigFiles in build.gradle not working
2018-11-29 14:04:40 -08:00
Patrick Kempff
0d26194589 Updated gradle to v4.4 and gradle-plugin to v3.1.4 2018-11-08 07:59:55 +01:00
Julius Kamiri
a581358d33
Fix envConfigFiles in build.gradle not working
Caused by picking the default environment file before checking for multiple configurations
2018-08-04 10:30:47 +03:00
Pedro Belo
195a209c9c escape strings in the env set from Gradle
so FOO=a"b works as expected. FOO="ab" still works because we're
stripping quotes around the values
2017-12-08 17:34:56 -08:00
Anson Yao
7f59748c0b Fix a bug such that different .env can be read according to android flavour (#195) 2017-12-08 17:34:35 -08:00
Pedro Belo
82ee9adad5 fix dotenv.gradle, keep loading the release name from gradle 2017-12-04 22:12:39 -08:00
Samer Murad
aceb7b4de0 Updated dotenv.gradle (#191)
Added an option to check for the "ENVFILE" var in the System properties, simply to allow more flexibility when running react-native-config directly from android studio with flavors
2017-12-04 15:50:35 -08:00
Henry Chan
be8d77e501 dotenv.gradle: Set environment variables per variant buildConfig task, with .env fallback (#180)
* dotenv.gradle: Environment variables are set per variant task

* Syncing readDotEnv with latest version

* Updating variable names

* Load default .env file

* BuildDotnevConfig.ruby: allow for default .env values
2017-11-16 11:48:57 -08:00
Bas Pellis
5321caba98 Allow to specify env files location as absolute path 2017-10-06 14:15:00 -07:00
Filip Kinský
629614bf2c fixed Android dotenv.gradle quotes matching (#151)
Fixed the regex - it caused syntax error in generated BuildConfig.java file when quotes were used in the `.env` file. `export VAR1="aa bb cc"` caused
```
/BuildConfig.java:15: error: unclosed string literal
  public static final String VAR1 = "aa bb cc"";
                                              ^
1 error
```
2017-09-25 12:03:57 -07:00
Amurmurmur
4ca9231ea5 Fix backward compatibility for RN < 0.47 (#144) 2017-09-08 13:52:10 -07:00
Alex Summer
4d8ffdb995 Remove override of 'createJSModules' (#137) 2017-08-02 18:01:46 -07:00
Ben Yorke
46b7f9401c Allow exported variables in .env (#116) 2017-06-20 17:14:38 -07:00
Eric Burke
69223a4db8 Fix for issue #56. Use task names and not task requests args to figure out which env file to use. The args and names should be the same. (#115) 2017-06-20 17:04:39 -07:00
sandeep.gs
fe9d1441b9 correct error message (#91) 2017-04-26 14:58:56 -07:00
Henry Tao
d2169de8c8 Added defaultEnvFile config (#99) 2017-04-26 14:55:36 -07:00
Pedro Belo
6e1b0e9a97 Fix android parsing (#59)
* format groovy code with 4 spaces

* catch a more specific exception here

* use a regexp to match, a bit more restrictive
2016-12-08 08:45:47 -08:00
mlanter
c6f12527fb Add support for specifying custom env files in gradle (#52)
* Add support for specifying env files in gradle

* Update different environment selection for Android
2016-11-28 15:07:50 -08:00
Pedro Belo
4747803915 Merge pull request #31 from skellock/fix-missing-env
Fix missing env
2016-09-13 18:20:55 -07:00
Steve Kellock
dcec930aa1 Prevents killing the android build with a missing .env file. 2016-08-28 21:20:09 -04:00
James G. Kim
235cbf4028 Replace % with a double-escaped unicode value
Resource strings cannot include `%` as-is (cf. http://stackoverflow.com/questions/4414389/android-xml-percent-symbol).
2016-08-21 08:52:11 +09:00
Fabrizio Moscon
9b5c99b3d2 use react-native from node_modules
- compile react-native as shown here: d344963123/local-cli/generator-android/templates/src/app/build.gradle (L131)
2016-07-31 00:51:45 +01:00
Nguyen Cao Nhat Linh
957a2b065b Remove unnecessary imports 2016-06-29 17:00:22 -07:00
Ryan Leckey
ae2ae2ea1e Add resources 2016-06-20 15:54:18 -07:00
Nguyen Cao Nhat Linh
87b5eaf034 Fix when applicationId ≠ package name
for using applicationIdSuffix in different flavors or when applicationId is different from package name in AndroidManifest #14
2016-06-16 16:06:10 -07:00
Pedro Belo
3f59dbf2ca ignore commented .env lines in android
eg:
2016-04-19 16:49:24 -07:00
Pedro Belo
379c093740 always use relative paths for ENVFILE 2016-03-03 13:32:32 -08:00
Pedro Belo
32d929e234 save env in project.env with gradle so it can be reused 2016-02-23 16:25:35 -08:00
Pedro Belo
4de8473fa6 set diff .env with ENVFILE 2016-02-23 16:07:24 -08:00
Pedro Belo
809fc21449 automatically read .env configs from gradle 2016-02-22 16:18:50 -08:00
Pedro Belo
9cc891f855 bring android implementation from react-native-android-config 2016-02-22 13:24:36 -08:00