File tree Expand file tree Collapse file tree 5 files changed +14
-8
lines changed
java/com/reactnativeshadowview Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ def getExtOrIntegerDefault(name) {
2626}
2727
2828android {
29+ def agpVersion = com.android.Version . ANDROID_GRADLE_PLUGIN_VERSION
30+ if (agpVersion. tokenize(' .' )[0 ]. toInteger() >= 7 ) {
31+ namespace " com.reactnativeshadowview"
32+ }
33+
2934 compileSdkVersion getExtOrIntegerDefault(' compileSdkVersion' )
3035 buildToolsVersion getExtOrDefault(' buildToolsVersion' )
3136 defaultConfig {
@@ -122,10 +127,11 @@ repositories {
122127}
123128
124129def kotlin_version = getExtOrDefault(' kotlinVersion' )
130+ def ktx_version = getExtOrDefault(' ktxVersion' )
125131
126132dependencies {
127133 // noinspection GradleDynamicVersion
128134 api ' com.facebook.react:react-native:+'
129135 implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
130- implementation " androidx.core:core-ktx:$k otlin_version "
136+ implementation " androidx.core:core-ktx:$k tx_version "
131137}
Original file line number Diff line number Diff line change 11ShadowView_kotlinVersion =1.5.0
2+ ShadowView_ktxVersion =1.7.0
23ShadowView_compileSdkVersion =29
34ShadowView_buildToolsVersion =29.0.2
45ShadowView_targetSdkVersion =29
Original file line number Diff line number Diff line change 1- <manifest xmlns : android =" http://schemas.android.com/apk/res/android"
2- package =" com.reactnativeshadowview" >
3-
1+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android" >
42</manifest >
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ open class ShadowLayout @JvmOverloads constructor(
260260 shadow_y_shift / shadow_downscale / cssRatio
261261 )
262262
263- override fun draw (canvas : Canvas ? ) {
263+ override fun draw (canvas : Canvas ) {
264264 canvas ? : return
265265 if (isInEditMode) {
266266 super .draw(canvas)
@@ -272,7 +272,7 @@ open class ShadowLayout @JvmOverloads constructor(
272272 if (shadow_cast_only_background) {
273273 background.bounds = viewBounds
274274 background?.draw(blurCanvas!! )
275- } else super .draw(blurCanvas)
275+ } else super .draw(blurCanvas!! )
276276 }
277277 if (realRadius > 0f ) { // Do not blur if no radius
278278 val (script) = getScript()
@@ -289,3 +289,4 @@ open class ShadowLayout @JvmOverloads constructor(
289289 }
290290
291291}
292+
Original file line number Diff line number Diff line change 11{
22 "name" : " @dimaportenko/react-native-shadow-view" ,
3- "version" : " 0.1.4 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " React Native library with Android native view which supports same shadows styles as iOS " ,
55 "main" : " lib/commonjs/index" ,
66 "module" : " lib/module/index" ,
3737 " android"
3838 ],
3939 "repository" : " https://github.com/dimaportenko/react-native-shadow-view" ,
40- "author" :
" Dima Portenko <[email protected] > (https://github.com/dimaportenko)" ,
40+ "author" : " Dima Portenko (https://github.com/dimaportenko)" ,
4141 "license" : " MIT" ,
4242 "bugs" : {
4343 "url" : " https://github.com/dimaportenko/react-native-shadow-view/issues"
You can’t perform that action at this time.
0 commit comments