Skip to content

Instantly share code, notes, and snippets.

View rutvikbhatt9's full-sized avatar
🎯
Focusing on new learning

Rutvik Bhatt rutvikbhatt9

🎯
Focusing on new learning
View GitHub Profile
@rutvikbhatt9
rutvikbhatt9 / ArtistScreenScrollView.js
Last active January 26, 2021 09:46
Setting Animated.ScrollView
<Animated.ScrollView
overScrollMode={'never'}
style={{zIndex: 10}}
scrollEventThrottle={16}
onScroll={Animated.event([{
nativeEvent: {contentOffset: {y: this.state.scrollY}},
}], {
listener: (event) => {
},
useNativeDriver: false,
constructor(props) {
super(props);
this.state = {
scrollY: new Animated.Value(0)
};
}
import React, {Component} from 'react';
/*Components*/
import {Animated, View, StatusBar, Text, Image, Platform, StyleSheet, Linking, TouchableOpacity} from 'react-native';
import Icons from 'react-native-vector-icons/MaterialCommunityIcons';
import MaterialAnimatedView from 'src/component/MaterialAnimatedView';
/*utils*/
import styles from './style';
import {ThemeUtils, Color} from 'src/utils';
/*Data*/
import artistData from 'src/assets/data/SongData';
@rutvikbhatt9
rutvikbhatt9 / package.json
Last active February 21, 2019 05:49
Setting scripts in package.json file
{
"name": "AppName",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"clear-watch": "watchman watch-del-all && watchman shutdown-server",
"ios-bundle": "react-native bundle --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios",
"ios-build": "react-native run-ios --configuration Release",
@rutvikbhatt9
rutvikbhatt9 / .gitlab.ci.yml (react-native)
Created February 11, 2019 05:53
.gitlab.ci.yml file for React-Native
image: openjdk:8-jdk #Defining the Docker Image
variables:
ANDROID_COMPILE_SDK: "28" #set compile SDK version
ANDROID_BUILD_TOOLS: "28.0.2" #set build tool version
ANDROID_SDK_TOOLS: "4333796" #set SDK tool build number you can find yous here https://developer.android.com/studio/releases/sdk-tools
before_script:
# Fetch the specified SDK tools version to build with
- wget --quiet --output-document=/tmp/sdk-tools-linux.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
@rutvikbhatt9
rutvikbhatt9 / .gitlab-ci.yml
Last active May 21, 2020 11:43
Create PlayJson directory in Docker container and make play-store-key.json file from CI/CD Variable
build_release_android:
stage: build_release_android
script:
- mkdir /PlayJson #make temp directory named PlayJson in root of project
- "echo $PLAY_STORE_JSON > /PlayJson/play-store-key.json" # copy git variable value to play-store-key.json file
- ./gradlew publishApkRelease # command to publish app on play store
only:
- master #set trigger for CICD if push or merge in master branch
artifacts:
paths:
@rutvikbhatt9
rutvikbhatt9 / .gitlab-ci.yml
Last active May 20, 2020 10:08
Full file
image: openjdk:8-jdk #Defining the Docker Image
variables:
ANDROID_COMPILE_SDK: "28" #set compile SDK version
ANDROID_BUILD_TOOLS: "28.0.2" #set build tool version
ANDROID_SDK_TOOLS: "4333796" #set SDK tool build number you can find yous here https://developer.android.com/studio/releases/sdk-tools
before_script:
#Installing Packages
- apt-get --quiet update --yes
@rutvikbhatt9
rutvikbhatt9 / build.gradle
Last active December 14, 2018 11:21
Set PlayStore release configuration in app/build.gradle file
...
android {
...
}
play {
track = 'alpha' // set track for playstore like 'production','beta','alpha'
serviceAccountEmail = 'fastlenesa@api-xxxxxxxxxxxxxxx-xxxxxx.iam.gserviceaccount.com' //paste your service account email
jsonFile = file('/PlayJson/play-store-key.json') // copy this line as it is do not modify
}
@rutvikbhatt9
rutvikbhatt9 / build.gradle
Created December 14, 2018 10:12
Set the Signin Configuration for your release build
android {
...
defaultConfig { ... }
signingConfigs {
release {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
storeFile file("my-release-key.jks")
storePassword "password"
keyAlias "my-alias"
@rutvikbhatt9
rutvikbhatt9 / build.gradle
Last active December 13, 2018 07:56
set the classpath in project level build.gradle file for Gradle Play Publisher Plugin
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.github.triplet.gradle:play-publisher:1.1.5 //add the classpath for Gradle Play Publisher Plugin
}
}