Skip to content

Commit a016613

Browse files
committed
Fixed bintray_script clean install
Skipped javadoc process
1 parent 6ff2444 commit a016613

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ buildscript {
88
}
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:3.2.1'
11-
1211

1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files

drfapi/bintray_script

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ bintray {
6464
configurations = ['archives']
6565
pkg {
6666
repo = bintrayRepo
67+
userOrg = "civilmachines"
6768
name = bintrayName
6869
desc = libraryDescription
6970
websiteUrl = siteUrl
@@ -78,3 +79,8 @@ bintray {
7879
}
7980
}
8081
}
82+
83+
tasks.withType(Javadoc) {
84+
enabled = false
85+
}
86+

drfapi/src/main/java/com/civilmachines/drfapi/SharedPreferenceAdapter.java

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
import org.json.JSONObject;
2626

2727
import java.util.Map;
28+
import java.util.Set;
2829

2930
public class SharedPreferenceAdapter {
3031

31-
SharedPreferences main;
32-
private SharedPreferences.Editor edit;
32+
public SharedPreferences main;
33+
public SharedPreferences.Editor edit;
3334

3435
/**
3536
* This function initializes the shared preference with Activity
@@ -51,6 +52,14 @@ public SharedPreferenceAdapter(Context cont, String AdapterName){
5152
main = cont.getSharedPreferences(AdapterName, Context.MODE_PRIVATE);
5253
}
5354

55+
public SharedPreferences.Editor getEditor() {
56+
return edit;
57+
}
58+
59+
public SharedPreferences sharedPreference() {
60+
return main;
61+
}
62+
5463
public int getInt(String key){
5564
return main.getInt(key, 0);
5665
}
@@ -59,6 +68,22 @@ public String getString(String key){
5968
return main.getString(key, null);
6069
}
6170

71+
public boolean getBoolean(String key){
72+
return main.getBoolean(key, false);
73+
}
74+
75+
public Set<String> getStringSet(String key){
76+
return main.getStringSet(key, null);
77+
}
78+
79+
public float getFloat(String key){
80+
return main.getFloat(key, 0);
81+
}
82+
83+
public long getLong(String key){
84+
return main.getLong(key, 0);
85+
}
86+
6287
public boolean saveData(String key, String val){
6388
edit = main.edit();
6489
edit.putString(key, val);
@@ -77,6 +102,24 @@ public boolean saveData(String key, long val){
77102
return edit.commit();
78103
}
79104

105+
public boolean saveData(String key, boolean val){
106+
edit = main.edit();
107+
edit.putBoolean(key, val);
108+
return edit.commit();
109+
}
110+
111+
public boolean saveData(String key, Float val){
112+
edit = main.edit();
113+
edit.putFloat(key, val);
114+
return edit.commit();
115+
}
116+
117+
public boolean saveData(String key, Set<String> val){
118+
edit = main.edit();
119+
edit.putStringSet(key, val);
120+
return edit.commit();
121+
}
122+
80123
public JSONObject getProperty() throws JSONException {
81124
JSONObject params = new JSONObject();
82125
Map<String, ?> allEntries = main.getAll();

0 commit comments

Comments
 (0)