Skip to content

Commit

Permalink
not loading token.properties globally anymore.
Browse files Browse the repository at this point in the history
syslogic committed Dec 18, 2023
1 parent 37e3e78 commit 291849e
Showing 2 changed files with 14 additions and 14 deletions.
17 changes: 3 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -50,6 +50,9 @@ if (System.env.JITPACK) {
project.ext.set('version_name', System.env.VERSION)
}

/** Build Configurations */
project.ext.set('archiveBuildTypes', ['debug', 'release'])

/** Keystore Settings, loaded from keystore.properties */
if (rootProject.file('keystore.properties').exists()) {
def keystore = new Properties()
@@ -62,20 +65,6 @@ if (rootProject.file('keystore.properties').exists()) {
project.ext.set('releaseKeyPass', keystore['releaseKeyPass'])
}

/** Build Configurations */
project.ext.set('archiveBuildTypes', ['debug', 'release'])

/** Load API access-token from file `token.properties` */
if(rootProject.file('token.properties').exists()) {
def apikeys = new Properties()
apikeys.load(new FileInputStream(rootProject.file('token.properties')))
project.ext.set('accessToken', apikeys['accessToken'])
} else {
println "*** File `token.properties` is missing; the GitHub API may be rate-limited."
println "*** The personal access token needs to be defined with an EditTextPreference."
project.ext.set('accessToken', "")
}

/** Modules */
allprojects {

11 changes: 11 additions & 0 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
@@ -4,6 +4,17 @@ plugins {
id "androidx.navigation.safeargs"
}

/** Load API access-token from file `token.properties` */
if (rootProject.file('token.properties').exists()) {
def apikeys = new Properties()
apikeys.load(new FileInputStream(rootProject.file('token.properties')))
project.ext.set('accessToken', apikeys['accessToken'])
} else {
println "*** File `token.properties` is missing; the GitHub API may be rate-limited."
println "*** The personal access token needs to be defined with an EditTextPreference."
project.ext.set('accessToken', "")
}

base {
archivesName = 'github_client_' + rootProject.ext.get('versionName')
}

0 comments on commit 291849e

Please sign in to comment.