Class IpRangeParserTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>
This class extends DefaultTask and is intended to be used within the Gradle build system.
Subclasses can implement any additional logic or extend functionality as needed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for theIpRangeParserTaskclass. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<String> Retrieves the database code request key used for requesting specific database codes in API calls or configuration settings.abstract org.gradle.api.provider.Property<String> Retrieves the database code used for identifying the IPv4 range database.abstract org.gradle.api.provider.Property<String> Retrieves the database code used for identifying the IPv6 range database.abstract org.gradle.api.file.RegularFilePropertyRetrieves the file property that represents the output file for this task.abstract org.gradle.api.provider.Property<String> getToken()Retrieves the token property required for authentication or API requests.abstract org.gradle.api.provider.Property<String> Retrieves the key used for identifying the token request parameter in API calls.abstract org.gradle.api.provider.Property<String> Retrieves the base URL property used for constructing API or resource endpoints.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
IpRangeParserTask
Constructor for theIpRangeParserTaskclass.Initializes default conventions for key properties related to the processing of IP range databases. These conventions define the default values used for the following: - IPv4 database code, set to "DB1LITECSV". - IPv6 database code, set to "DB1LITECSVIPV6". - Base URL for downloading resources, set to "https://www.ip2location.com/download". - Token request key, set to "token". - Database code request key, set to "file".
The constructor ensures these defaults are applied upon instantiation of the task, facilitating consistent behavior for downloading and processing IP range data unless overridden by specific configurations.
- Parameters:
conf- the conf from which to extract the task values
-
-
Method Details
-
getToken
-
getIpv4dbCode
-
getIpv6dbCode
-
getUrlBase
-
getTokenRequestKey
-
getDbCodeRequestKey
-
getOutput
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getOutput()Retrieves the file property that represents the output file for this task.The output file is the destination where the processed data (e.g., a JSON file combining parsed IPv4 and IPv6 data) will be written after task execution.
- Returns:
- a
RegularFilePropertyrepresenting the output file location.
-