We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are currently a problem, where it will not get all the dependencies + it will not place them in the correct deps (plugin, buildscript, etc.)
I have been trying with AntennaPod ( https://github.com/AntennaPod/AntennaPod ), where it will
gradle-env.json
-g
mkInitScript = projectSpec: let repos = mapAttrs (mkRepo projectSpec.name) projectSpec.dependencies; test = mkRepo "test" "test" (projectSpec.dependencies.buildscript ++ projectSpec.dependencies.project ++ projectSpec.dependencies.plugin); in writeText "init.gradle" '' static def offlineRepo(RepositoryHandler repositories, String env, String path) { repositories.clear() repositories.maven { name "Nix''${env.capitalize()}MavenOffline" url path metadataSources { it.gradleMetadata() it.mavenPom() it.artifact() } } repositories.ivy { name "Nix''${env.capitalize()}IvyOffline" url path layout "maven" metadataSources { it.gradleMetadata() it.ivyDescriptor() it.artifact() } } } gradle.settingsEvaluated { offlineRepo(it.pluginManagement.repositories, "plugin", "${test}") } gradle.projectsLoaded { allprojects { buildscript { offlineRepo(repositories, "buildscript", "${test}") } offlineRepo(repositories, "project", "${test}") } } '';
To work around it. Is there even a reason to separate them?
You can try it for yourself with this patch applied to gradle-env.nix
gradle-env.nix
And using this default.nix
{ pkgs ? import <nixpkgs> {config.android_sdk.accept_license = true;} }: with pkgs; let buildGradle = pkgs.callPackage ./../gradle2nix/app/src/dist/share/gradle-env.nix {}; sdk = pkgs.androidenv.composeAndroidPackages { buildToolsVersions = [ "28.0.3" ]; # buildToolsVersions = [ "28.0.3" ]; platformVersions = [ "28" ]; abiVersions = [ "x86" "x86_64"]; # toolsVersion = "26.1.1"; }; gradle2nix = buildGradle { envSpec = ./gradle-env.json; src = pkgs.fetchFromGitHub { owner = "AntennaPod"; repo = "AntennaPod"; rev = "1.8.3"; sha256 = "0qhp50jz7nf2rf4v8p2y2z1p8js6h6313cm5b829bxz3h12ib8ai"; }; # gradleFlags = [ "assemble" ]; gradleFlags = [ "clean" "assemblePlayDebug" "assemblePlayRelease" ]; preBuild = '' echo "sdk.dir = ${sdk.androidsdk}/libexec/android-sdk" > local.properties printf "\nandroid.aapt2FromMavenOverride=${sdk.androidsdk}/libexec/android-sdk/build-tools/29.0.3/aapt2" >> gradle.properties ''; installPhase = '' mkdir -p $out ls -alR app/build find . -name '*.apk' -exec cp {} $out \; ''; }; in gradle2nix
The getting dependencies should work, else try what I did in #17 , and delete the cache.
The text was updated successfully, but these errors were encountered:
I think that #17 needs to be fixed, and then this might go away.
Sorry, something went wrong.
No branches or pull requests
There are currently a problem, where it will not get all the dependencies + it will not place them in the correct deps (plugin, buildscript, etc.)
I have been trying with AntennaPod ( https://github.com/AntennaPod/AntennaPod ), where it will
gradle-env.json
to something like 4.x.x, even if a higher version is specified with-g
To work around it. Is there even a reason to separate them?
You can try it for yourself with this patch applied to
gradle-env.nix
And using this default.nix
The getting dependencies should work, else try what I did in #17 , and delete the cache.
The text was updated successfully, but these errors were encountered: