Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • android/org.benoitharrault.snake
1 result
Select Git revision
Show changes
Showing
with 22 additions and 282 deletions
Correction/amélioration des metadata f-droid
Mise à jour du framework, des outils de construction et des dépendances
Ajout d'un correcteur automatique de code. Application des corrections. Mise à jour des dépendances.
Jeu du serpent
\ No newline at end of file
Jeu du serpent
\ No newline at end of file
Jeu du serpent
\ No newline at end of file
AuthorName: 'Benoît Harrault'
Categories:
- Games
Name: Snake game
AutoName: snake
License: GPL-3.0-only
WebSite: 'https://git.harrault.fr/android/org.benoitharrault.snake'
SourceCode: 'https://git.harrault.fr/android/org.benoitharrault.snake'
IssueTracker: 'https://git.harrault.fr/android/org.benoitharrault.snake/issues'
Changelog: 'https://git.harrault.fr/android/org.benoitharrault.snake/-/tags'
Summary: Snake game, simple and classic
Description: |
Snake game, simple and classic
RepoType: git
Repo: 'https://git.harrault.fr/android/org.benoitharrault.snake.git'
FdroidAppUrl: 'https://f-droid.org/fr/packages/org.benoitharrault.snake/'
#! /bin/bash
# Check dependencies
command -v inkscape >/dev/null 2>&1 || { echo >&2 "I require inkscape but it's not installed. Aborting."; exit 1; }
command -v scour >/dev/null 2>&1 || { echo >&2 "I require scour but it's not installed. Aborting."; exit 1; }
command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not installed. Aborting."; exit 1; }
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
SOURCE="${CURRENT_DIR}/icon.svg"
SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg"
OPTIPNG_OPTIONS="-preserve -quiet -o7"
if [ ! -f "${SOURCE}" ]; then
echo "Missing file: ${SOURCE}"
fi
if [ ! -f "${SOURCE_FASTLANE}" ]; then
echo "Missing file: ${SOURCE_FASTLANE}"
fi
# optimize svg
cp ${SOURCE} ${SOURCE}.tmp
scour \
--remove-descriptive-elements \
--enable-id-stripping \
--enable-viewboxing \
--enable-comment-stripping \
--nindent=4 \
--quiet \
-i ${SOURCE}.tmp \
-o ${SOURCE}
rm ${SOURCE}.tmp
# build icons
function build_icon() {
ICON_SIZE="$1"
TARGET="$2"
echo "Building ${TARGET}"
TARGET_PNG="${TARGET}.png"
inkscape \
--export-width=${ICON_SIZE} \
--export-height=${ICON_SIZE} \
--export-filename=${TARGET_PNG} \
${SOURCE}
optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG}
}
# build fastlane image
function build_fastlane_image() {
WIDTH="$1"
HEIGHT="$2"
TARGET="$3"
echo "Building ${TARGET}"
cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp
scour \
--remove-descriptive-elements \
--enable-id-stripping \
--enable-viewboxing \
--enable-comment-stripping \
--nindent=4 \
--quiet \
-i ${SOURCE_FASTLANE}.tmp \
-o ${SOURCE_FASTLANE}
rm ${SOURCE_FASTLANE}.tmp
TARGET_PNG="${TARGET}.png"
inkscape \
--export-width=${WIDTH} \
--export-height=${HEIGHT} \
--export-filename=${TARGET_PNG} \
${SOURCE_FASTLANE}
optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG}
}
build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher
build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher
build_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher
build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher
build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher
build_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon
build_fastlane_image 1024 500 ${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic
#! /bin/bash
# Check dependencies
command -v inkscape >/dev/null 2>&1 || { echo >&2 "I require inkscape but it's not installed. Aborting."; exit 1; }
command -v scour >/dev/null 2>&1 || { echo >&2 "I require scour but it's not installed. Aborting."; exit 1; }
command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not installed. Aborting."; exit 1; }
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
OPTIPNG_OPTIONS="-preserve -quiet -o7"
ICON_SIZE=192
#######################################################
# Game images
AVAILABLE_GAME_IMAGES="
button_back
button_start
game_fail
game_win
level_easy
level_normal
level_hard
level_nightmare
"
# Skins
AVAILABLE_SKINS="
retro
colors
"
# Images per skin
SKIN_IMAGES="
empty
head
body
fruit
"
#######################################################
# optimize svg
function optimize_svg() {
SOURCE="$1"
cp ${SOURCE} ${SOURCE}.tmp
scour \
--remove-descriptive-elements \
--enable-id-stripping \
--enable-viewboxing \
--enable-comment-stripping \
--nindent=4 \
--quiet \
-i ${SOURCE}.tmp \
-o ${SOURCE}
rm ${SOURCE}.tmp
}
# build icons
function build_icon() {
SOURCE="$1"
TARGET="$2"
echo "Building ${TARGET}"
if [ ! -f "${SOURCE}" ]; then
echo "Missing file: ${SOURCE}"
fi
optimize_svg "${SOURCE}"
inkscape \
--export-width=${ICON_SIZE} \
--export-height=${ICON_SIZE} \
--export-filename=${TARGET} \
${SOURCE}
optipng ${OPTIPNG_OPTIONS} ${TARGET}
}
function build_icon_for_skin() {
SKIN_CODE="$1"
# skin main image
build_icon ${CURRENT_DIR}/skin_${SKIN_CODE}.svg ${BASE_DIR}/assets/icons/skin_${SKIN_CODE}.png
# skin images
for SKIN_IMAGE in ${SKIN_IMAGES}
do
build_icon ${CURRENT_DIR}/skins/${SKIN_CODE}/${SKIN_IMAGE}.svg ${BASE_DIR}/assets/skins/${SKIN_CODE}_${SKIN_IMAGE}.png
done
}
mkdir -p ${BASE_DIR}/assets/icons
mkdir -p ${BASE_DIR}/assets/skins
# build game images
for GAME_IMAGE in ${AVAILABLE_GAME_IMAGES}
do
build_icon ${CURRENT_DIR}/${GAME_IMAGE}.svg ${BASE_DIR}/assets/icons/${GAME_IMAGE}.png
done
# build skins images
for SKIN in ${AVAILABLE_SKINS}
do
build_icon_for_skin "${SKIN}"
done
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#e41578" stroke="#fff" stroke-width=".238"/><path d="m59.387 71.362c1.1248 1.1302 4.0012 1.1302 4.0012 0v-45.921c0-1.1316-2.8832-1.1316-4.0121 0l-37.693 20.918c-1.1289 1.1248-1.1479 2.9551-0.02171 4.084z" fill="#fefeff" stroke="#930e4e" stroke-linecap="round" stroke-linejoin="round" stroke-width="8.257"/><path d="m57.857 68.048c0.96243 0.96706 3.4236 0.96706 3.4236 0v-39.292c0-0.96825-2.467-0.96825-3.4329 0l-32.252 17.898c-0.96594 0.96243-0.9822 2.5285-0.01858 3.4945z" fill="#fefeff" stroke="#feffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.314"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#49a1ee" stroke="#fff" stroke-width=".238"/><path d="m34.852 25.44c-1.1248-1.1302-4.0012-1.1302-4.0012 0v45.921c0 1.1316 2.8832 1.1316 4.0121 0l37.693-20.918c1.1289-1.1248 1.1479-2.9551 0.02171-4.084z" fill="#fefeff" stroke="#105ca1" stroke-linecap="round" stroke-linejoin="round" stroke-width="8.257"/><path d="m36.382 28.754c-0.96243-0.96706-3.4236-0.96706-3.4236 0v39.292c0 0.96825 2.467 0.96825 3.4329 0l32.252-17.898c0.96594-0.96243 0.9822-2.5285 0.01858-3.4945z" fill="#fefeff" stroke="#feffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.314"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#db8616" stroke="#000" stroke-width="2"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#db1616" stroke="#000" stroke-width="2"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#6a78de" stroke="#000" stroke-width="2"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#be6ade" stroke="#000" stroke-width="2"/><rect x="8.5767" y="8.6213" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="8.6213" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="36.557" y="8.6213" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="8.6213" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="22.864" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="37.105" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="51.285" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="65.064" y="51.285" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="51.285" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="65.266" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="79.24" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="65.064" y="79.24" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="79.24" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="36.557" y="79.24" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="79.24" width="14.139" height="14.139" fill="#353ab0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="65.266" width="14.139" height="14.139" fill="#2d00e0" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><circle cx="29.34" cy="44.175" r="5.7602" fill="#209239" stroke="#1c6e24" stroke-linecap="round" stroke-width="4.2294"/></svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#be6ade" stroke="#000" stroke-width="2"/><rect x="8.5767" y="8.6213" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="8.6213" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="36.557" y="8.6213" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="8.6213" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="22.864" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="37.105" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="51.285" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="65.064" y="51.285" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="51.285" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="65.266" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="79.284" y="79.24" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="65.064" y="79.24" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="50.844" y="79.24" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="36.557" y="79.24" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="79.24" width="14.139" height="14.139" fill="#727272" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><rect x="22.27" y="65.266" width="14.139" height="14.139" fill="#6f6f71" stroke="#fff" stroke-linecap="round" stroke-width="3.6305"/><circle cx="29.34" cy="44.175" r="5.7602" fill="#595959" stroke="#454545" stroke-linecap="round" stroke-width="4.2294"/></svg>
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/home/benoit/snap/flutter/common/flutter
FLUTTER_APPLICATION_PATH=/home/benoit/dev/perso/android/org.benoitharrault.snake
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=false
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/home/benoit/snap/flutter/common/flutter"
export "FLUTTER_APPLICATION_PATH=/home/benoit/dev/perso/android/org.benoitharrault.snake"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end
NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */
//
// Generated file. Do not edit.
//
// clang-format off
#import "GeneratedPluginRegistrant.h"
#if __has_include(<shared_preferences_ios/FLTSharedPreferencesPlugin.h>)
#import <shared_preferences_ios/FLTSharedPreferencesPlugin.h>
#else
@import shared_preferences_ios;
#endif
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
[FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
}
@end