0

I'd like to load gradle and dependencies from a local file system. I'm using Gradle 5.5 and it is local file. My "plugins" section, from build.gradle.kts file is:

plugins {
    id ("java-library")
    id ("org.xbib.gradle.plugin.jflex") version "1.2.0"
    id ("cup.gradle.cup-gradle-plugin") version "1.2"
    jacoco
}

jacoco {
    toolVersion = "0.8.8"
}

repositories {
    maven {
        url = uri("https://repo1.maven.org/maven2/")
    }
    jcenter()
    maven {
        url = uri("https://plugins.gradle.org/m2/")
    }
}

If I run this code with internet connection, build will be successfully finished. But I need to build code on comp without internet connection. Also I cannot use local cash folder because every comp has different folder structure and names in .gradle/caches. Code must be buildable on different comps without internet connection.

Just to add that I already have dependency .jar files which I successfully load from local folder using:

dependencies {
    ...
    implementation(files("path_to_libs_folder/gson-2.7.jar"))
    ...
} 

I checked what will happened if I disconnect comp from internet and build fail with error:

* What went wrong:
Plugin [id: 'com.gradle.build-scan', version: '2.3', artifact: 'com.gradle:build-scan-plugin:2.3'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.gradle:build-scan-plugin:2.3')
  Searched in the following repositories:
    Gradle Central Plugin Repository

Questions:

  • from where to download "org.xbib.gradle.plugin.jflex" and "cup.gradle.cup-gradle-plugin" files and how to load them from local file system?
user51
  • 8,843
  • 21
  • 79
  • 158
D.J.
  • 1

0 Answers0