Compare commits
4 Commits
33e767f8f8
...
b1c4cb19f2
Author | SHA1 | Date | |
---|---|---|---|
b1c4cb19f2 | |||
ee0be003e9 | |||
ecd6c3a40e | |||
febda3c8ca |
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,3 +27,6 @@ doc/api/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
|
||||
#Custom files to ignore
|
||||
secrets/upload-keystore.jks
|
||||
secrets/keystore.properties
|
@ -5,8 +5,23 @@ plugins {
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
// Load keystore properties from the independent secrets folder
|
||||
def keystoreProperties = new Properties()
|
||||
|
||||
// Automatically get the absolute path to the secrets/keystore.properties file based on the project root
|
||||
def keystorePropertiesFile = new File(rootProject.projectDir, '../../secrets/keystore.properties')
|
||||
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
} else {
|
||||
throw new FileNotFoundException("Keystore properties file not found at: ${keystorePropertiesFile.absolutePath}")
|
||||
}
|
||||
|
||||
println "Keystore properties file exists: ${keystorePropertiesFile.exists()}"
|
||||
println "Keystore file path: ${keystoreProperties['storeFile']}"
|
||||
|
||||
android {
|
||||
namespace = "hu.qwit.filc.filc"
|
||||
namespace = "hu.qwit.filc"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
@ -21,7 +36,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "hu.qwit.filc.filc"
|
||||
applicationId = "hu.qwit.filc"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
@ -30,15 +45,22 @@ android {
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(keystoreProperties['storeFile']) // Path to the keystore file
|
||||
storePassword keystoreProperties['storePassword'] // Keystore password
|
||||
keyAlias keystoreProperties['keyAlias'] // Key alias
|
||||
keyPassword keystoreProperties['keyPassword'] // Key password
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.debug
|
||||
signingConfig signingConfigs.release // Use the release signing config
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package hu.qwit.filc.filc
|
||||
package hu.qwit.filc
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
|
40
secrets/README.md
Normal file
40
secrets/README.md
Normal file
@ -0,0 +1,40 @@
|
||||
# hogyan hozz létre upload-keystore-t flutterhez?
|
||||
|
||||
ha ezt olvasod, akkor valószínűleg szeretnéd a refilc appot build-elni. ha bármi kérdésed lenne, nyugodtan keress minket discordon, vagy akár emailben is!
|
||||
|
||||
## 1. keystore létrehozása
|
||||
|
||||
először, nyiss egy terminált ebben a mappában és futtasd ezt a parancsot:
|
||||
|
||||
```sh
|
||||
keytool -genkeypair -v \
|
||||
-keystore upload-keystore.jks \
|
||||
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||
-alias upload
|
||||
```
|
||||
|
||||
ezután meg kell adnod néhány adatot:
|
||||
- egy jelszót a keystore-hoz (ezt jegyezd meg!)
|
||||
- nevedet, szervezeted nevét (nyugodtan hagyhatod alapértelmezetten)
|
||||
- egy második jelszót az „upload” aliashoz (ajánlott az előzőt használni)
|
||||
|
||||
ha minden jól megy, egy `upload-keystore.jks` fájl létrejön.
|
||||
|
||||
## 3. keystore.properties létrehozása
|
||||
|
||||
hozz létre egy új fájlt `keystore.properties` néven, és írd bele a következőt:
|
||||
|
||||
```properties
|
||||
storeFile=../secrets/upload-keystore.jks
|
||||
storePassword=password
|
||||
keyPassword=password
|
||||
keyAlias=upload
|
||||
```
|
||||
|
||||
cseréld ki a `password` részeket, természetesen a választott jelszavadra.
|
||||
|
||||
## 4. secrets mappa kizárása a gitből
|
||||
|
||||
már beleraktuk a .gitignore mappába a kizárását ennek, ezen nem kell aggódnod.
|
||||
|
||||
készen is vagy, sok sikert!
|
Loading…
x
Reference in New Issue
Block a user