Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
[l.d.manifest] Fix the version code bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev committed Aug 24, 2015
1 parent 5544911 commit 0188893
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/leiningen/droid/manifest.clj
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,18 @@

;; ### Manifest templating

(def ^:private version-bit-sizes
"Amount of bits allocated for each version bucket."
[9 9 9 5])

(def ^:private version-maximums
"Maximum values per each version bucket."
(mapv (partial bit-shift-left 1) [9 9 9 5]))
(mapv (partial bit-shift-left 1) version-bit-sizes))

(def ^:private version-coefficients
"Each part of the version number will be multiplied by the respective
coefficient, all of which are calculated here."
(->> version-maximums
(->> version-bit-sizes
(reductions +)
(mapv (fn [offset] (bit-shift-left 1 (- 32 offset))))))

Expand Down

0 comments on commit 0188893

Please sign in to comment.