Skip to content

Commit

Permalink
stop find version from local
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintin committed Oct 3, 2017
1 parent 0963887 commit dbcb8b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion andle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import andle.android
import andle.sdk

__version__ = "2.0.0"
__version__ = "2.1.0"


def update(path, dryrun, remote, gradle, interact):
Expand Down
29 changes: 1 addition & 28 deletions andle/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ def load(path=""):

# find dependencies
data["dependency"] = {}
find_dependency(data["dependency"], "", path +
"/extras/android/m2repository")
find_dependency(data["dependency"], "", path +
"/extras/google/m2repository")


return data


Expand All @@ -52,29 +48,6 @@ def find_config(data, name, path):
update_value(f, data, name)


def find_dependency(data, tag, path):
if find_dependency_folder(data, tag, path):
return
list = tag[1:].split("/")
if len(list) < 2:
return
version = list.pop(len(list) - 1)
name = list.pop(len(list) - 1)
package = ".".join(list)

update_value(version, data, package + ":" + name)


def find_dependency_folder(data, tag, path):
resolved = False
if os.path.exists(path):
for f in os.listdir(path):
if (os.path.isdir(path + "/" + f)):
resolved = True
find_dependency(data, tag + "/" + f, path + "/" + f)
return resolved


def update_value(var, obj, key):
if key in obj:
if andle.version.newer(obj[key], var) > 0:
Expand Down

0 comments on commit dbcb8b0

Please sign in to comment.